Q&A: Hostage crisis in Algeria
The Algerian government says that in the course of a military operation to retake an Algerian gas plant 69 people died, including at least 39 hostages and 29 Islamist kidnappers.
Three of the hostage-takers have been arrested.
One Algerian security guard was killed as extremists launched their attack last Wednesday, but the number of deaths among Algerians is not yet clear.
Gunmen with al-Qaeda links attacked the plant, which housed hundreds of foreign and Algerian workers, on 16 January. The complex is located at Tigantourine, near In Amenas deep in the Sahara desert.
Hostage crisis: What we know
Some 685 Algerian workers at the plant and 100 foreigners escaped or were freed.
The aim of the kidnappers was to "blow up the gas plant", Algerian Prime Minister Abdelmalek Sellal said. The militants killed a number of hostages before Algerian special forces launched a final assault on the plant on 19 January.
The kidnappers said their attack on the gas plant was in retaliation for France's intervention in the war against Islamist militants in Mali. The government has rejected the claim, saying the attack on the gas plant had been planned for more than two months.
Here BBC News looks at how the crisis developed, who is involved and possible motives of the hostage-takers.
How were the hostages taken?
Heavily armed gunmen attacked two buses carrying foreign gas workers of the Tigantourine plant 3km (1.9 miles) before dawn on Wednesday (16 January), Algerian officials say. The buses were leaving the employees' housing quarters when the assault occurred. The workers' armed escort repelled the militants but one Briton and one Algerian were killed during the firefight. Six other people - two Britons, a Norwegian, two police officers and a security guard - were wounded.
The front bus managed to travel on to In Amenas where the injured were treated, government officials said. The rear bus lost a wheel as it reversed back into the compound. The passengers got out and tried to run to safety in their living quarters, a Japanese survivor told Japan's Daily Yomiuri newspaper.
Travelling in at least three vehicles, the militants then drove on to the actual installation, where they took hostages inside a wing of the living quarters. The militants were armed with rocket-propelled grenades and told the hostages they had mined the installation.
How did the Algerian security forces respond?
Troops backed by helicopters surrounded the site early on, with the government saying in public that it would not negotiate with the militants. On the first day of the siege, one of the militants, named as Abu al-Baraa, told al-Jazeera TV that soldiers had opened fire, injuring one of the hostages. At least one hostage reported hearing shots.
On Thursday, the Algerian army bombarded the militants as they tried to move hostages in a convoy. Stephen McFaul, a hostage who survived the attack, was quoted by his brother as saying captives had been put on five four-wheel-drive vehicles, bound, gagged, and with explosives fastened to their necks.
Only Mr McFaul's jeep survived the attack, crashing, at which point the hostage managed to break free. "The army bombed four out of five of the trucks and four of them were destroyed," Brian McFaul said, as quoted by Reuters. It is not known how many captives were in each jeep. It was unclear whether the vehicles had been struck by missiles fired from helicopters or by ground forces. In a claim that could not be verified on the ground, the militants said 35 hostages and 15 militants had been killed by helicopter fire.
On Saturday, Algerian forces launched a raid to retake the facility after reports that the militants had killed a number of the captives and were planning to blow up the gas plant. "The terrorists shot some of the hostages in the head," Algerian Prime Minster Abdelmalek Sellal said in a statement.
The brother of Kenny Whiteside, one of the Britons killed during the siege, said the militants "had lined up four hostages, including Kenny, and executed them".
What do we know of the foreign hostages?
At least 37 foreigners have been killed, while some 100 were freed or escaped. Five hostages remain unaccounted for and some of the dead are yet to be identified.
It has emerged that
- Nine Japanese citizens working at the site have been confirmed dead, while one Japanese national remains missing and unaccounted for
- Five Norwegians are missing, including the stepfather of Norway's minister of international development, Heikki Holmas
- Three Britons were killed, one in the initial attack; three more are missing, feared dead, as is one non-British UK resident
- Three US citizen have been confirmed dead
- One French national has been been confirmed dead
- Six Filipinos have been killed, with another four still missing. Four survivors are being treated in hospital in Algiers, Philippine officials say
- Two Malaysians are missing, fate unknown
- Two Romanian citizens are confirmed dead, while three escaped
- An Austrian hostage was freed, the Austrian foreign minister said
Why were there so many foreign nationals at the plant?
The In Amenas gas installation is a joint venture between Norway's Statoil, Britain's BP and the Algerian state company Sonatrach. A Japanese engineering firm, JGC Corp, provides services for the facility, which is located at Tigantourine, about 40km from In Amenas. The remote site - it is 1,300km south-east of Algiers - produces 9bn cu m of gas a year, or more than a tenth of Algeria's overall gas output.
Who are the hostage-takers?
Algeria says the militants, thought to have travelled from northern Mali in all-terrain vehicles, came from several countries, including Canada, Mauritania, Egypt, Tunisia, Mali, Niger and Algeria itself.
According to Algerian police, notorious Algerian militant Mokhtar Belmokhtar organised the attack. A veteran of the war against Soviet forces in Afghanistan in the 1980s, he recently fell out with leaders of al-Qaeda in the Islamic Maghreb (AQIM), which is based in Algeria. He now leads a group of his own, known variously as the Signed-in-Blood Battalion, the Masked Men Brigade and the Khaled Abu al-Abbas Brigade. Convicted in absentia of terrorism in Algeria, Belmokhtar has been blamed for abductions and killings of both Algerians and foreigners stretching back a decade. It is not known if he actually took part in the attack on the gas plant.
Algerian Prime Minister Abdelmalek Sellal said the attack on the ground is thought to have been led by an Algerian, Amine Benchenab, who was known to security forces and killed during the attack.
Meanwhile Mauritanian news agencies who had been in contact with the militants, named Abdul Rahman al-Nigeri as another leader of the assault operation. The veteran fighter from Niger joined the militant Salafist Group for Preaching and Combat (GSPC) in 2005. Reports say al-Nigeri led the kidnappers into the gas plant where he is believed to have been killed.
Is there a link to Mali?
There has been a flurry of demands issued by the hostage-takers, passed on through phone calls or media statements. They variously described their attack as a reaction to the French operation in Mali, where militants linked to AQIM are active, and a reaction to Algeria granting France permission to use its airspace. However, France only decided last week to intervene militarily in Mali.
The militants also accused Algeria of shutting its border to Malian refugees and demanded the release of dozens of Islamists held in Algerian prisons. Ransom may also be a motive for the attack as Belmokhtar is said to have made millions of dollars out of hostages in the past.
The Algerian government has rejected the Mali link, saying the assault on the gas facility had been planned for more than two months. Analysts believe the militants may have received inside help.