Algerian troops have ended a siege at a gas facility in the Sahara desert killing 11 Islamist militants after they killed seven hostages, Algerian state news agency APS has said.
The hostages were summarily killed as the troops tried to free them, it said.
Foreign workers were among the hostages, but the nationalities of the dead are not known.
UK Defence Secretary Philip Hammond confirmed the crisis was over and that lives had been lost.
At a joint news conference with his US counterpart Leon Panetta, Mr Hammond said the loss of life was "appalling and unacceptable and we must be clear that it is the terrorists who bear sole responsibility for it".
Britain was pressing Algeria for further details, he added.
The militants had been involved in a stand-off since Thursday after trying to occupy the remote site.
APS has previously said 12 Algerian and foreign workers have been killed since rescue efforts began.
On Friday, 573 Algerians and about 100 of 132 foreigners working at the plant were freed, Algerian officials said.
About 30 foreigners remain unaccounted for, including fewer than 10 from the UK.
The militants themselves said before the raid that they had been holding seven hostages.
Shortly before reports of the final assault emerged, the leader of the hostage-takers, Abdul Rahman al-Nigeri, said the government had to choose between negotiating with the kidnappers and leaving the hostages to die.
He said the area had been booby-trapped and swore to blow up the complex if the Algerian army used force.
Algerian national oil and gas company Sonatrach said the army was now clearing mines planted by the militants.
The crisis at the remote In Amenas desert gas facility began on Wednesday when militants attacked two buses carrying foreign workers. A Briton and an Algerian reportedly died in the incident.
The militants then took Algerians and expatriates hostage at the complex. The leader of the hostage-takers is said to be a veteran fighter from Niger, named as Abdul Rahman al-Nigeri by the Mauritanian news agency ANI, which has been in contact with the militants.
The Algerian armed forces attacked on Thursday as militants tried to move some of their captives from the facility.
APS reported before Saturday's raid that a group of militants remained at the site, holed up in a workshop with the remaining hostages and armed with rocket-launchers and machine guns.
The Algerian newspaper El Watan quoted officials as saying that the militants tried to sabotage the gas installation on Friday evening by starting a fire, but that it was quickly extinguished.
"The terrorists were prepared to commit a collective suicide; the army's intervention led to their neutralisation. Unfortunately, the hostages were executed," the newspaper added.
Information from the siege has been hard to come by. No foreign reporters are thought to have been given access to the In Amenas plant.
The In Amenas gas field is situated at Tigantourine, about 40km (25 miles) south-west of the town of In Amenas and 1,300km (800 miles) south-east of Algiers.
The plant is jointly run by BP, Norway's Statoil and Algeria's state-owned oil company.
A statement from the kidnappers said the assault on the gas plant was launched in retaliation for French intervention against Islamist groups in neighbouring Mali.
How the crisis unfolded