The Algerian army on Saturday carried out a final assault on Al-Qaeda-linked gunmen holed up in a desert gas plant, killing 11 of the Islamists after they took the lives of seven more foreign hostages, a local source and the state news agency said.
"It is over now, the assault is over, and the military are inside the plant clearing it of mines," a local source familiar with the operation told Reuters.
The state oil and gas company, Sonatrach, said the militants who attacked the plant on Wednesday and took a large number of hostages had booby-trapped the complex with explosives.
The exact death toll among the gunmen and the foreign and Algerian workers at the plant near the town of In Amenas close to the Libyan border remained unclear.
Earlier on Saturday, Algerian special forces found 15 burned bodies at the plant. Efforts were under way to identify the bodies, the source told Reuters, and it was not clear how they had died.
Sixteen foreign hostages were freed on Saturday, a source close to the crisis said. They included two Americans, two Germans and one Portuguese. Britain said fewer than 10 of its nationals at the plant were unaccounted for.
The attack on the plant swiftly turned into one of the biggest international hostage crises in decades, pushing Saharan militancy to the top of the global agenda.
It marked a serious escalation of unrest in northwestern Africa, where French forces have been in Mali since last week fighting an Islamist takeover of Timbuktu and other towns.
The captors said their attack was a response to the French offensive. However, some U.S. and European officials say the elaborate raid probably required too much planning to have been organized from scratch in the week since France launched its strikes.
Scores of Westerners and hundreds of Algerian workers were inside the heavily fortified gas compound when it was seized before dawn on Wednesday by Islamist fighters who said they wanted a halt to the French intervention in neighboring Mali.
Hundreds escaped on Thursday when the army launched a rescue operation, but many hostages were killed.
Before the final assault, different sources had put the number of hostages killed at between 12 and 30, with many foreigners still unaccounted for, among them Norwegians, Japanese, Britons and Americans.
The figure of 30 came from an Algerian security source, who said eight Algerians and at least seven foreigners were among the victims, including two Japanese, two Britons and a French national. One British citizen was killed when the gunmen seized the hostages on Wednesday.
The US State Department said on Friday one American, Frederick Buttaccio, had died but gave no further details.
Leaders of Britain, Japan and other countries have expressed frustration that the assault was ordered without consultation and officials have grumbled at the lack of information.
France's defense minister, Jean-Yves Le Drian, declined to criticize the Algerian response to the crisis, however.
"The Algerian authorities are on their own soil and responding in the fashion they can. The overriding mission is to tackle the terrorists," he told France 3 television.
The base was home to foreign workers from Britain's BP, Norway's Statoil, Japanese engineering firm JGC Corp and others.
The apparent ease with which the fighters swooped in from the dunes to take control of an important energy facility, which produces some 10 percent of the natural gas on which Algeria depends for its export income, has raised questions over the value of outwardly tough Algerian security measures.
Algerian officials said the attackers may have had inside help from among the hundreds of Algerians employed at the site.
France says the incident proves its decision to fight Islamists in neighboring Mali was necessary.
The field commander of the Islamist group that attacked the plant is a veteran fighter from Niger called Abdul Rahman al-Nigeri, Mauritanian news agencies reported.
Security in the half-dozen countries around the Sahara desert has long been a preoccupation of the West. Smugglers and militants have earned millions in ransom from kidnappings.
The most powerful Islamist groups operating in the Sahara were severely weakened by Algeria's secularist military in a civil war in the 1990s. But in the past two years the regional wing of Al-Qaeda gained fighters and arms as a result of the civil war in Libya, when arsenals were looted from Muammar Gaddafi's army.
Al-Qaeda-linked fighters, many with roots in Algeria and Libya, took control of northern Mali last year.