Page 2 of 3 --

The militants, who came from a Mali-based al-Qaida 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.

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 Corp., 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,’’ 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.’’

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 (1.6 kilometers) 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 Col. 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.’’

While the Algerian government has only admitted to 23 hostages dead so far, the militants claimed through the Mauritanian news website ANI that the helicopter attack alone killed 35 hostages.

One American, a Texan — Frederick Buttaccio from the Houston suburb of Katy — was among the dead. ‘‘Fred spent a lifetime experiencing the world and always respecting everyone he met, no matter their position, culture, or religion,’’ the family said in a statement Saturday.

President Barack Obama said in a statement Saturday that the U.S. stood ready to provide whatever assistance was needed in the wake of the attack.

‘‘This attack is another reminder of the threat posed by al-Qaida and other violent extremist groups in North Africa. In the coming days, we will remain in close touch with the Government of Algeria to gain a fuller understanding of what took place so that we can work together to prevent tragedies like this in the future,’’ the statement said.

French Defense Minister Jean-Yves Le Drian said Saturday that a 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 government said Saturday it is trying to determine the fate of six people from Britain who are either dead or unaccounted for.

Prime Minister David Cameron of Britain said, ‘‘There is no justification for taking innocent life in this way. Our determination is stronger than ever to work with allies right around the world to root out and defeat this terrorist scourge and those who encourage it.’’

The Norwegian government said there were five Norwegians unaccounted for.Continued...