Algiers said on Monday that 37 foreigners of eight different nationalities, as well as an Algerian, were killed by hostage-takers in a well-planned attack on a remote gas plant.
Prime Minister Abdelmalek Sellal said five other foreigners were still missing and that several of the hostages had been executed "with a bullet to the head" as the four-day crisis ended in a bloodbath on Saturday.
Most of the 32 militants who took hundreds of people hostage at the In Amenas gas complex in the Sahara on Wednesday had entered the country from neighboring Mali, Sellal told a news conference in Algiers.
The premier gave the final grim figures after Algeria had warned other nations to prepare for a higher body count, amid fears as many as 50 captives may have died in the world's deadliest hostage crisis in almost a decade.
"Thirty-seven foreigners of eight different nationalities," were killed during the siege, Sellal told reporters, adding an Algerian was also killed, giving an overall toll of 38.
He said the group's leader was Mohamed el-Amine Bencheneb, an Algerian militant known to the country's security services, and was killed during the army's assault.
A total of 29 hostage-takers were killed and three captured. As well as the three Algerians among them, the kidnappers comprised six foreign nationalities, namely Canadian, Egyptian, Tunisian, Malian, Nigerien and Mauritanian.
Governments have been scrambling to track down missing citizens as more details emerged after the final showdown on Saturday between special forces and extremists who had taken the hostages, demanding an end to French military intervention in Mali.
Survivors' photos seen by AFP showed bodies riddled with bullets, some with their heads half blown away by the impact of the gunfire.
"They were brutally executed," said an Algerian who identified himself as Brahim, after escaping the ordeal, referring to Japanese victims gunned down by the hostage-takers.
Japan's Prime Minister Shinzo Abe said seven Japanese people were known to have been killed in the hostage crisis, the first confirmation from Tokyo that any of its nationals had died.
Witnesses had said nine Japanese people connected to plant builder JGC were killed in the 72-hour ordeal.
One Japanese survivor was quoted in the Daily Yomiuri newspaper as telling colleagues how the gunmen had dragged him from his barricaded room, handcuffed him and executed two hostages standing nearby.
The Philippine government said six Filipino hostages were among the dead, killed "mostly by gunshot wounds and the effects of the explosions."
As more harrowing accounts emerged of the siege, a Filipino survivor described how the militants used foreign hostages as human shields to stop Algerian troops aboard helicopters from strafing them with gunfire.
Joseph Balmaceda told reporters in Manila he was the only survivor out of nine hostages in a van that blew up on Thursday, apparently from C-4 explosives the militants had rigged to the vehicle.