Gunmen dressed in army uniforms who stormed Kabul's Intercontinental Hotel have battled Afghan Special Forces for 12 hours in an overnight siege that left at least five people dead.
The Taliban claimed responsibility for the attack, which saw more than 150 guests flee, with some shimmying down tied-together sheets from upper-floor windows and others rescued by Afghan forces.
Abdul Rahman Naseri, a guest who was at the hotel for a conference, was in the hall of the hotel when he saw four insurgents dressed in army uniforms.
"They were shouting in Pashto (language), 'Don't leave any of them alive, good or bad. Shoot and kill them all,' one of them shouted," Naseri said.
"I ran to my room on the second floor. I opened the window and tried to get out using a tree but the branch broke and I fell to the ground. I hurt my back and broke a leg."
Interior Ministry spokesman Najib Danish said the siege ended on Sunday when the last gunman was shot dead.
Even after officials said the attack was over, sporadic gunshots and explosions could be heard from the site.
It is unclear exactly how many gunmen were involved. Danish said three gunmen were killed, while witnesses said four were involved and the Taliban said five.
At least five other people were killed and six wounded, a lower casualty total than earlier feared, while 153 people, including 41 foreigners were evacuated, Danish said.
As day broke on Sunday, thick clouds of black smoke could be seen pouring from the building. Several armoured US military vehicles with heavy machine guns could be seen close to the hotel along with Afghan police units.
Hotel manager Ahmad Haris Nayab, who escaped unhurt, said the attackers had got into the main part of the hotel through a kitchen, with many guests trapped in their rooms.
"When the sixth floor caught fire this morning, my roommate told me, either burn or escape," said Mohammad Musa, who was hiding in his room on the top floor when he heard gunfire.
The raid came just days after a US embassy warning of possible attacks on hotels in Kabul.
The Intercontinental Hotel, an imposing 1960s structure set on a hilltop and heavily protected like most public buildings in Kabul, was previously attacked by Taliban fighters in 2011.