Twenty-one hostages died during the siege that began when the Al-Qaeda-linked gunmen attacked the In Amenas facility deep in the Sahara desert at dawn on Jan 16, the interior ministry said.
Thirty-two kidnappers were also killed, and special forces were able to free "685 Algerian workers and 107 foreigners," it said.
Among the dead were an unknown number of foreigners -- including from Britain, France, Romania and the United States -- and many were still unaccounted for, including Japanese.
The kidnappers led by Algerian Mokhtar Belmokhtar, a former Al-Qaeda commander in North Africa, killed two people on a bus, a Briton and an Algerian, before taking hundreds of workers hostage when they overran the gas plant.
Belmokhtar's "Signatories in Blood" group had been demanding an end to French military intervention against jihadists in neighbouring Mali.
In Saturday's assault, "the Algerian army took out 11 terrorists, and the terrorist group killed seven foreign hostages," state television said, without giving a breakdown of their nationalities.
A security official who spoke to AFP as army helicopters overflew the plant gave the same death tolls, adding it was believed the foreigners were executed "in retaliation".
As experts began to clear the complex of bombs planted by the Islamists, residents of In Amenas breathed a collective sigh of relief.
"We went from a peaceful situation to a terror situation," said one resident who gave his name as Fouad. "The plant could have exploded and taken out the town," said another.
Algerian Brahim Zaghdaoui said he was not surprised by the Algerian army's ruthless final assault. "It was predictable that it would end like that," he said standing outside the town's hospital, where coffins were seen arriving in the morning.
Most of the hostages had been freed on Jan 17 when Algerian forces launched a rescue operation, which was widely condemned as hasty.
But French President Francois Hollande and US Defence Secretary Leon Panetta refused to blame Algeria. The response by Algiers was "the most appropriate" given it was dealing with "coldly determined terrorists ready to kill their hostages," said Hollande.
Panetta added: "They are in the region, they understand the threat from terrorism... I think it's important that we continue to work with (Algiers) to develop a regional approach."
British Defence Secretary Philip Hammond said the crisis had been "brought to an end by a further assault by Algerian forces, which has resulted in further loss of life".
The deaths were "appalling and unacceptable and we must be clear that it is the terrorists who bear sole responsibility for it," he said.
The hostage-taking was the largest since the 2008 Mumbai attack, and the biggest by jihadists since hundreds were killed in a Moscow theatre in 2002 and at a school in the Russian town of Beslan in 2004, according to monitoring group IntelCenter.
Foreign Secretary William Hague said a total of six British nationals and one resident of the United Kingdom were either dead or unaccounted for.
Prime Minister Shinzo Abe of Japan said he had received "severe information" about 10 of his country's nationals who were still missing.
The gunmen said on Jan 18 that they were still holding "seven foreign hostages" -- three Belgians, two Americans, one Japanese and a Briton.