NEW YORK — The gunmen, dressed in fatigues and wearing turbans, stormed in well before dawn aboard pickup trucks, announcing their arrival with a burst of gunfire.
Dozens of employees were eating breakfast at the time before heading off to the vast network of tubes and silos of the In Amenas gas field, where hundreds of Algerians and foreigners work to extract natural gas from the arid sands of the Sahara.
“God is great,’’ the gunmen cried as they arrived.
It was the beginning of a terrifying ordeal — one in which foreign hostages would come under fire from both the gunmen holding them and the Algerian government soldiers trying to free them. For many of the captives, it is an ordeal that has yet to end.
Some hostages were forced to wear explosives on their bodies. Others hid under beds and on rooftops, praying to survive but expecting death. One was shot in the back while his fellow captives looked on. Left by their captors with their cellphones, some phoned home with terrifying accounts of the horrors unfolding all around.
These were among the chilling tales recounted Friday by some of the hundreds of workers who managed to escape the national gas field on the eastern edge of Algeria that had been stormed by Islamist militants two days before.
The gunmen, fighters with a group called Al Mulathameen, said they were acting to avenge the French intervention in nearby Mali, Algerian officials said. But there were indications that the attack had been planned long before the French military began its offensive to recapture the northern half of that country from Islamist insurgents.
The attackers appeared to know the site well, even the fact that disgruntled Algerian catering workers were planning a strike.
‘‘We know you’re oppressed, we’ve come here so that you can have your rights,’’ the militants told Algerians at the facility, according to one Algerian former hostage. Another hostage said the fighters had asked about the plans for a strike.
‘‘The terrorists were covered with explosives, and they had detonators,’’ said a senior Algerian government official briefed on the crisis. He said the situation remained a standoff Friday, with ‘‘a few terrorists holding a few hostages.’’
Former captives said several of the fighters appeared to be foreign, with non-Algerian accents. One Algerian worker said that some of them may have been Libyan and Syrian, and that one might have been French. Another gunman who spoke impeccable English was assigned to speak to the many foreigners.
When the Algerian military eventually intervened, the situation grew even more chaotic. According to one witness, Algerian helicopters attacked several jeeps that were carrying hostages. The fate of at least some of those hostages remains unknown, as the Algerian state news agency reported that 12 Algerian and foreign workers had been killed since the start of the military operation and dozens remained unaccounted for.
From the start, it was clear that the gunmen wished to harm only foreigners. Algerian workers, along with other Muslims who could prove their faith by reciting from the Koran, were herded into one area, workers said.
‘‘They told us, ‘We are your brothers. You have telephones: Call your families to reassure them,’ ’’ said an Algerian worker.