Taliban gunmen have stormed one of Afghanistan's premier hotels, sparking a five-hour battle that left 19 people dead, including all eight attackers.
Militants who had managed to penetrate the Inter-Continental Hotel's security measures began the attack around 10pm on Tuesday, on the eve of a conference about the transfer of security responsibilities.
After hours of fighting, two Nato helicopters opened fire at about 3am on the roof of the five-storey hotel where militants had taken up positions.
US Army Major Jason Waggoner, a spokesman for the US-led coalition fighting in Afghanistan, said the helicopters killed three gunmen and Afghan security forces clearing the hotel worked their way up to the roof and engaged the insurgents.
A final explosion occurred a few hours later when one of the bombers who had been hiding in a room blew himself up long after ambulances had carried the dead and wounded from the hotel, which sits on a hill overlooking the capital.
The strike against the Inter-Continental was one of the biggest and most complex to have occurred in Kabul and appeared designed to show that the insurgents are capable of striking even in the centre of power at a time when US officials are speaking of progress in the nearly 10-year war.
It occurred less than a week after President Barack Obama announced the beginning of an American withdrawal and the transfer of security responsibility to the Afghans in several areas, including most of Kabul province.
Latifullah Mashal, the spokesman of the Afghan National Directorate for Security, said eight suicide attackers were involved and all had either blown themselves up or been killed by Afghan or coalition forces.
The 11 civilians killed included a judge from an unnamed province, five hotel workers and three Afghan policemen, Mr Mashal said. He said no foreigners were killed, but two were among 14 people wounded in the attack. He did not disclose their nationalities.
Nazar Ali Wahedi, chief of intelligence for Helmand province in the south, called the assailants "the enemy of stability and peace" in Afghanistan.
As the helicopters attacked and Afghan security forces moved in, there were four massive explosions. Officials at the scene said the blasts occurred when security forces either fired on suicide bombers or they blew themselves up.
After the gunmen were killed, the hotel lights that had been blacked out during the attack came back on.
The Taliban claimed the rare night-time attack in the capital - an apparent attempt to show that they remain potent despite heavy pressure from coalition and Afghan security forces.
Taliban spokesman Zabiullah Mujahid later issued a statement claiming that Taliban attackers killed guards at a gate and entered the hotel.
"One of our fighters called on a mobile phone and said, 'We have got on to all the hotel floors and the attack is going according to the plan. We have killed and wounded 50 foreign and local enemies. We are in the corridors of the hotel now taking guests out of their rooms - mostly foreigners. We broke down the doors and took them out one by one'."
The attackers were heavily armed with machine guns, anti-aircraft weapons, rocket-propelled grenades, hand grenades and grenade launchers, the Afghan officials said.
Afghan police rushed to the scene and firefights broke out. A few hours into the clashes, an Afghan National Army commando unit arrived at the hotel. Guests inside the hotel said they heard gunfire echoing throughout the heavily guarded building.