The prime minister said “the last words of the terrorist chief” was to slaughter the hostages.
“He gave the order for all the foreigners to be killed, so there was a mass execution; many hostages were killed by a bullet to the head,” he said.
Three Americans died in the attack, and seven made it out safely, a U.S. official in Washington said, speaking on condition of anonymity because he was not authorized to speak publicly. Their bodies have been recovered, the official said.
Algeria has not reported any military deaths from four days of confronting the fighters.
The attack began early Wednesday with the attempted hijacking of two buses filled with workers outside the complex. Under assault from Algerian forces, the militants moved on the main complex, armed with missiles, mortars and bombs for their three explosives experts, Mr. Sellal said.
He praised the quick wits of a guard who set of an alarm that stopped the flow of gas and warned workers of an imminent attack.
“It was thanks to him that the factory was protected,” he said.
Mr. Floria, the former hostage, remembered the moment when the power was cut.
“I ran together with other expats and hid under the desks in my office, locking the door. Attackers went scanning the office facility, kicking the doors in. Luckily our door did not break, and they went on to other offices,” he said. “Locals were freed; the attackers made clear from the beginning that only foreigners were a target.”
Mr. Floria ultimately escaped but not before he heard the two gunshots that killed two wounded foreign hostages that he said he had tried to save.
MR. Sellal said the facility had 790 Algerian workers and 134 foreigners from 26 countries. The Algerians were freed early in the standoff — former hostages said the attackers immediately separated out the foreigners, forcing some to wear explosive belts.
The prime minister said the heavily armed militants came from northern Mali carrying a great deal of explosives and mined the facility.
MR. Sellal justified the Algerian military helicopter attack Thursday on vehicles filled with hostages and Islamists out of the fear that the kidnappers were attempting to escape.
The Algerian special forces assault on the refinery on Saturday that killed the last group of militants and hostages came after the kidnappers attempted to destroy the complex.
The Masked Brigade, the group that claimed to have masterminded the takeover, has warned of more such attacks against any country backing France’s military intervention in Mali. Algeria had allowed French planes to fly over its territory to reach Mali.