* Taliban claims responsibility, says dead are German
* Police say at least 13 dead, both Afghans and foreigners
* Restaurant popular among expats in Afghan capital (Adds details, quotes, background)
By Jessica Donati and Mirwais Harooni
KABUL, Jan 17 (Reuters) - At least 13 people, including both Afghans and foreigners, were killed when a suicide bomber blew himself up near a popular Lebanese restaurant in the Afghan capital Kabul on Friday, police said.
Islamist militant Taliban insurgents claimed responsibility for the attack in the Wazir Akbar Khan district, which hosts many embassies and restaurants catering for expatriates.
"More than 13 people were killed, Afghan and foreigners," said Mohammad Zahir, Kabul's police chief, adding that the nationalities of the foreign casualties were not immediately clear.
A Taliban spokesman said that those killed were German nationals. In Berlin, the German foreign ministry said it could not confirm that Germans were involved.
The assault was carried out around dinner time in the heavily fortified district where many wealthy Afghans also live. 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.
Some officials suggested militants were still inside the venue but no gunfire could be heard more than an hour after the attack and it was unclear if any customers were still inside.
Hashmat Stanekzai, a spokesman for Kabul police, said 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 came at a tough time for Afghanstan as most foreign forces prepare to leave the country this year after more than a decade of war and almost daily attacks.
Security concerns have been also rising ahead of an April presidential election when Afghans will vote to choose a successor to President Hamid Karzai, an event likely to be targeted by Taliban insurgent.
On Friday night, gunfire continued for about 20 minutes after the initial blast and the main road leading to the area was cordoned off.
Interior Ministry spokesman Sediq Sediqi said three suicide bombers approached the building, one of whom detonated his bomb whereas the other two were shot by security forces.
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 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 insurgents on their own. (Writing by Maria Golovnina; additional reporting by Erik Kirschbaum in Berlin, editing by Alister Doyle)