An eyewitness has told the BBC of the terrifying moment gunmen burst into Kabul's Intercontinental Hotel restaurant on Saturday.
The man, who is not being named for security reasons, said he was spared after saying he was an Afghan. "Where are the foreigners?" they shouted.
Fourteen foreigners are confirmed to have died, along with four Afghans.
The interior minister said the recent decision to transfer security to a private company had been a mistake.
Some 160 people were rescued after Afghan troops fought throughout the night to regain control of the building.
Three attackers were also killed in the siege, officials said. Ten people, including four civilians, were injured.
Kabul police told the BBC that nine Ukrainians, one German, one Greek and one Kazakh citizen had been confirmed dead. Two have yet to be identified.
Afghan airline Kam Air says a number of its employees were killed and some are still missing.
The Taliban, which targeted the hotel in 2011, says it was behind the latest attack. A spokesman said in a statement quoted by AFP that the group had "killed tens of foreign invaders and their puppets".