At least 20 people were killed after Taliban gunmen stormed a lakeside hotel close to the Afghanistan capital and seized dozens of hostages.

Elite Afghan police backed by NATO forces ended the 12-hour siege, in which up to 15 civilians died.

The commander of NATO forces in Afghanistan said the attack bore the signature of the Taliban-linked Haqqani group that he said continued to operate from Pakistan.

General John Allen's comments come days after US Defense Secretary Leon Panetta said Washington was at the limits of its patience with Pakistan over the existence of militant networks including the Haqqani.

Pakistan says it is doing everything it can to fight militants on its side of the border and accuses Afghanistan of trying to shift the blame for its failure to combat the insurgency.

Up to 300 people were inside the Spozhmai hotel, overlooking Qargha Lake, when the attack began.

Afghan interior ministry spokesman Sediq Sediqqi said 12 to 15 civilians, two hotel guards and a policeman were killed in the gunbattle.

Five attackers were also killed.

The attack, quickly claimed by the Afghan Taliban, again showed the ability of insurgents to stage high-profile raids even as NATO nations prepare to withdraw most of their combat troops by the end of 2014 and leave Afghans to lead the fight.