Afghan policemen stand gaurd near the Park Place guesthouse in Kabul on Thursday.

Reuters/Kabul

The Afghan Taliban claimed responsibility on Thursday for an attack on a popular guesthouse in Kabul that killed at least 14 people, including foreigners attending a dinner and arriving for a concert.

Four Indian nationals, a Briton, an American and a Kazakh national were confirmed among the dead in a five-hour assault at Park Palace guesthouse in an upscale neighbourhood of central Kabul.

The attack heightened a sense of insecurity in the Afghan capital and throughout the country as the Taliban step up attacks following the withdrawal of most foreign troops.

Kabul's police chief said 44 people were rescued.

A day after the assault, there was still confusion about how many gunmen attacked. A statement from President Ashraf Ghani's office said there were three gunmen, while Kabul police said they could confirm just one.

Taliban spokesman Zabihullah Mujahid said in an emailed statement that one of the insurgents' operatives carried out the attack with the aim of killing foreign citizens in retaliation for the US and its allies supporting the Kabul government of President Ashraf Ghani.

"The occupying forces should realize that they are not safe from our attacks under any cover or in any location," Mujahid said.

The death toll rose from five to 14 on Thursday as more bodies were found.

"It was one attacker and we are still investigating how he got in," police criminal investigation chief Farid Afzali Kabul said.

A Kabul security official put the number of dead at 14, and the number was confirmed by the UN Assistance mission in a statement.

The US and Indian embassies and Kazakhstan's Foreign Ministry confirmed their citizens were among the dead, and an Afghan with British nationality was also killed.

"With regret we can confirm that a British dual national was killed in last night's attack on a Kabul guesthouse," a British embassy spokesman said on Thursday.

The shooting started on Wednesday night as some guests gathered for a dinner at the guest house and others were arriving for a concert.

A spate of similar attacks in Kabul last year has dampened the city's once-vibrant social scene.

Late last year, a suicide bomber detonated at a French cultural centre performance, killing one person.

In March 2014, Taliban gunmen killed nine people - including three children - in the upscale Serena Hotel in Kabul.

Two months earlier, attackers stormed into a popular Lebanese restaurant in the capital and gunned down 21 people, including three UN staff and a senior IMF official. 

Related Story