AIN AMENAS, ALGERIA // In a bloody finale, Algerian special forces stormed a natural gas complex in the Sahara desert on Saturday to end a standoff with Islamist extremists that left at least 19 hostages and 29 militants dead. Dozens of foreign workers remain unaccounted for, leading to fears the death toll could rise.
With few details emerging from the remote site in eastern Algeria, it was unclear whether anyone was rescued in the final operation.
The siege at Ain Amenas transfixed the world after radical Islamists linked to Al Qaeda stormed the complex, which contained hundreds of plant workers from all over the world, and then held them hostage surrounded by the Algerian military and its attack helicopters for four tense days that were punctuated with gun battles and dramatic tales of escape.
Algeria's response to the crisis was typical of the country's history in confronting terrorists, favouring military action over negotiation, which caused an international outcry from countries worried about their citizens. Algerian military forces twice assaulted the two areas where the hostages were being held with minimal apparent mediation - first on Thursday and then on Saturday.
In the final assault, the remaining band of militants killed seven hostages before special forces killed 11 of the attackers, the state news agency said. It wasn't immediately possible to verify who killed the hostages. The military launched its assault to prevent a fire started by the extremists from engulfing the complex, the report said.
The seven hostages and 11 militants adds to the previous toll of 12 captives and 18 kidnappers, according to the government, but there are fears that the number of hostages killed is much higher and dozens of foreign workers from the Ain Amenas site remain unaccounted for.
Sonatrach, the Algerian state oil company running the site along with BP and Norway's Statoil, said the entire refinery had been mined with explosives, and the process of clearing it out had begun, indicating the militants planned to blow up the complex - one of the largest in oil and gas-rich Algeria.
Algeria has fought its own Islamist rebellion since the 1990s, elements of which later declared allegiance to Al Qaeda and then set up new groups in the poorly patrolled wastes of the Sahara along the borders of Niger, Mali, Algeria and Libya, where they flourished.
The standoff has put the spotlight on Al Qaeda-linked groups that roam these remote areas, threatening vital infrastructure and energy interests. The militants initially said their operation was intended to stop a French attack on Islamist militants in neighbouring Mali - though they later said it was two months in the planning, long before the French intervention.
The militants, who came from a Mali-based group run by an Algerian, attacked the plant on Wednesday morning. Armed with heavy machine guns and rocket launchers in four-wheel drive vehicles and fell on a pair of buses taking foreign workers to the airport. The buses' military escort drove off the attackers in a blaze of gunfire that sent bullets zinging over the heads of crouching workers. A Briton and an Algerian - probably a security guard - were killed.
Frustrated, the militants turned to the vast gas complex, divided between the workers' living quarters and the refinery itself, and seized hostages, the Algerian government said. The gas flowing to the site was cut off.
The Algerian government said the militants crept across the border from Libya, 60 miles (100 kilometres) away, while the militants later said they came from Niger, hundreds of miles to the south.
On Thursday, Algerian helicopters kicked off the military's first assault on the complex by opening fire on a convoy carrying both kidnappers and their hostages, resulting in many deaths, according to witnesses.
The accounts of hostages who escaped the standoff showed they faced dangers from both the kidnappers and the military.
Ruben Andrada, 49, a Filipino civil engineer who works as one of the project management staff for the Japanese company JGC, described how he and his colleagues were used as human shields by the kidnappers, which did little to deter the Algerian military.
On Thursday, about 35 hostages guarded by 15 militants were loaded into seven SUVs in a convoy to move them from the housing complex to the refinery, Andrada said. The militants placed "an explosive cord" around their necks and were told it would detonate if they tried to run away, he said.
"When we left the compound, there was shooting all around," Mr Andrada said, as Algerian helicopters attacked with guns and missiles. "I closed my eyes. We were going around in the desert. To me, I left it all to fate."
Mr Andrada's vehicle overturned allowing him and a few others to escape. He sustained cuts and bruises and was grazed by a bullet on his right elbow. He later saw the blasted remains of other vehicles, and the severed leg of one of the gunmen.
The site of the gas plant spreads out over several hectares (acres) and includes a housing complex and the processing site, about a mile apart, making it especially complicated for the Algerians to secure the site and likely contributed to the lengthy standoff.
"It's a big and complex site. It's a huge place with a lot of people there and a lot of hiding places for hostages and terrorists," said Colonel Richard Kemp, a retired commander of British forces who had dealt with hostage rescues in Iraq and Afghanistan. "These are experienced terrorists holding the hostages."
Casualty figures varied widely. While the Algerian government has only admitted to 19 hostages dead so far, the militants claimed through the Mauritanian news website ANI that the helicopter attack alone killed 35 hostages.
One American, from Texas, is among the dead and at least one Briton, a Frenchman and Algerians have also died in the standoff. Escaped Algerian workers describe seeing people of many nationalities, including Japanese, shot down.
Jean-Yves Le Drian, the French defence minister, said on Saturday that the Frenchman killed, Yann Desjeux, was a former member of the French special forces and part of the security team. The remaining three French nationals who were at the plant are now free, the foreign ministry said.
The British foreign secretary, William Hague, confirmed that as of Saturday, there were "fewer than 10" British nationals still at risk or unaccounted for and "the majority of" Britons at the plant were now safe, he said.
Statoil CEO Helge Lund said Saturday that there were only six Norwegians unaccounted for, from the 17 at the plant at the time of the attack. BP said four of its 18 employees were still unaccounted for.
The Romanian prime minister, Victor Ponta, said on Saturday one Romanian hostage was killed in the course of the siege, while four escaped unharmed.