Gunmen in army uniforms who stormed Kabul's Intercontinental Hotel yesterday and battled Afghan Special Forces through the night killed more than 30 people and wounded many more, although the final toll of dead and wounded may still be higher.
Wahid Majroh, a spokesman for the ministry of public health, said that 19 bodies had been brought into city hospitals, with six identified as foreigners.
However a senior Afghan security official said the death toll was over 30 and might climb higher. The dead included hotel staff and guests as well as members of the security forces who fought the attackers.
All five attackers were also killed, interior ministry spokesman Najib Danesh said.
The raid was the latest in a series of attacks that have underlined the city's vulnerability and the ability of militants to mount high-profile operations aimed at undermining confidence in the western-backed government.
More than 150 guests were able to flee as parts of the building caught fire, with some shimmying down sheets tied together and dropped from upper-floor windows and others rescued by Afghan forces.
Local media reports said the dead included Venezuelans and Ukrainians.
Six Ukrainians were killed in the attack, Ukrainian foreign minister Pavlo Klimkin said.
"Reported to the President about the death of six Ukrainians as a result of an attack on a hotel in Kabul," he said on the ministry's Twitter account.
Local airline Kam Air said around 40 of its pilots and aircrew, many of whom are foreigners, were staying in the hotel and as many as 10 had been killed.
Zamari Kamgar, the airline's deputy director, said it was still trying to locate staff.
The Taliban, which attacked the same hotel in 2011, claimed responsibility for the attack, its spokesman Zabihullah Mujahid said in a statement.
A statement from the interior ministry put the blame on the Haqqani network, a group affiliated with the Taliban that is notorious for its attacks on urban targets.
Abdul Rahman Naseri, a guest who was at the hotel for a conference, was in the hall of the hotel when he saw four gunmen 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," Mr 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."