Sonatrach, the Algerian state oil company running the Ain Amenas site along with BP ( BP) and Norway's Statoil ( STO), said the entire refinery had been mined with explosives, and that the process of clearing it out is now under way.

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 these 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 neighboring 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 al Qaeda splinter group run by an Algerian, attacked the plant Wednesday morning. Armed with heavy machine guns and rocket launchers in four-wheel drive vehicles, they 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.

The militants then 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.

Saturday's government statement said the militants came across the border from "neighboring countries," while the militants said they came from Niger, hundreds of miles (kilometers) 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 to stop them from escaping, resulting in many deaths, according to witnesses.

If you liked this article you might like

Time to Play Equifax?

Energy M&A Weekly: More Midstream IPOs Expected in 2017

Time to Play Equifax?

Here's Where Wall Street Stands

Dow Posts Fresh Record, Third in a Row, but S&P 500 and Nasdaq Fall