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.
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.