* Taliban claims responsibility, says dead are German
* Police say up to 15 dead, mostly foreigners
* Restaurant popular among expatriates in Afghan capital (Adds death of two Canadians in paragraph 3)
By Jessica Donati and Mirwais Harooni
KABUL, Jan 17 (Reuters) - Up to 15 people, mostly foreigners, were killed on Friday when a suicide bomber blew himself up outside a popular Lebanese restaurant in the Afghanistan capital of Kabul, police said.
Islamist Taliban insurgents claimed responsibility for the attack in the upscale Wazir Akbar Khan district, which hosts many embassies and restaurants catering for expatriates.
The International Monetary Fund (IMF) said its representative in Afghanistan was one of the dead, and the United Nations said three of its staff were killed as well. Canadian Foreign Affairs Minister John Baird said two Canadians died in the attack but it was not clear if they were in addition to the deaths reported by the IMF and U.N.
"Such targeted attacks against civilians are completely unacceptable and are in flagrant breach of international humanitarian law," U.N. spokesman Farhan Haq said. "They must stop immediately."
General Ayoub Salangi, an Afghan deputy interior minister, said between 13 and 15 people, mostly foreigners, were killed but their nationalities were not immediately clear.
A Taliban spokesman said that those killed were German nationals. In Berlin, the Foreign Ministry said it could not confirm that Germans were involved.
State Department spokeswoman Jen Psaki said none of the dead included U.S. Embassy staff in Kabul.
The attack took place during a busy dinner time on a Friday evening when expatriates in Kabul tend to eat out. The heavily fortified diplomatic district also houses many wealthy Afghans and business people. Bursts of gunfire followed the attack.
"First there was a suicide attack near a restaurant for foreigners where a man detonated his explosives attached to his body, and then possibly one or two insurgents entered the restaurant," one Afghan security source said.
IMF representative Wabel Abdallah, a 60-year-old Lebanese national, was killed in the explosion, the IMF said. He had been leading the Fund's office in Kabul since 2008.
"This is tragic news, and we at the fund are all devastated," IMF Managing Director Christine Lagarde said in a statement. "Our hearts go out to Wabel's family and friends, as well as the other victims of this attack."
Interior Ministry spokesman Sediq Sediqi said three suicide bombers had approached the building, one of whom detonated his bomb whereas the other two were shot by security forces.
On Friday night, gunfire continued for about 20 minutes after the blast and the main road leading to the area was cordoned off.
After the explosion, two gunmen stormed into the restaurant and started shooting at people dining there, security sources said, adding that foreign casualties had been taken to an international military camp in eastern Kabul.
In a nearby hospital, those wounded from the attack screamed and some people cried, pressing scarves against their faces to stifle sobs, as doctors administered treatment. One man, the son of an Afghan victim, kicked the wall as he howled in grief.
"One of the restaurant's cooks was injured," said Abdul Bashir, a doctor. "Two dead bodies have been taken to the morgue."
Hashmat Stanekzai, a spokesman for Kabul police, said earlier that an operation to clear the building was under way.
"The clearance operation is still ongoing. Our security forces are not inside the restaurant yet," he said. "There might be some insurgents inside so we have to act carefully to avoid possible casualties."
The attack as most foreign forces are preparing to leave Afghanistan this year after more than a decade of war and almost daily attacks.
Security concerns have been rising ahead of an April presidential election when Afghans will choose a successor to President Hamid Karzai, an event likely to be targeted by the Taliban insurgents.
Security remains a major concern as Afghanistan and the United States struggle to agree on a key bilateral security pact, raising the prospect that Washington may yet pull out all of its troops this year unless differences are ironed out.
Two years ago, the United States ended its military mission in Iraq with a similar "zero option" after the failure of talks with Baghdad.
Karzai is still deliberating whether to allow some U.S. troops to stay to help his nation regain calm and stability after years of conflict. If no agreement is reached, Afghan forces would be left to fight the insurgents on their own. (Writing by Maria Golovninal; Additional reporting by Erik Kirschbaum in Berlin; Louis Charbonneau in New York; and Anna Yukhananov and Lesley Wroughton in Washington; Editing by Gareth Jones, Amanda Kwan and Lisa Shumaker)