ALGIERS, Algeria (AP) -- Algerian officials scrambled Thursday for a way to end an armed standoff deep in the Sahara desert with Islamic militants who have taken dozens of foreigners hostage, turning to tribal Algerian Tuareg leaders for talks and contemplating an international force.
The government was in talks throughout the night with the United States and France over whether they could help against the militants, who say they attacked the natural gas plant in retaliation for France's military intervention against al-Qaida-linked rebels in neighboring Mali.
The group claiming responsibility — called Katibat Moulathamine or the Masked Brigade — says it has captured 41 foreigners, including seven Americans, in the surprise attack Wednesday on the Ain Amenas gas plant.
Two people, one a Briton and the other Algerian, were killed in the initial assault, which the U.S. defense secretary has called "a terrorist attack."
The kidnapping is one of the largest ever attempted by a militant group in North Africa.
Algerian troops have surrounded the isolated gas plant, located 800 miles (1300 kilometers) south of the capital of Algiers, and have vowed not to negotiate with the hostage-takers. With no obvious way out for the militants, there is a possibility that the end could be violent.
The Algerian official, who was not authorized to speak publicly about the attack, said officials also contacted tribal elders among Algerian Tuaregs, who are ethnically related to the rebels fighting the Mali government, some of whom have close al-Qaida links. The official said the government hoped the Tuaregs might help negotiate an end to the standoff.
Algerian state radio reported Thursday that 30 local workers managed to escape from the plant, but hundreds of Algerian workers had already been released Wednesday by the hostage-takers.
Militants phoned a Mauritanian news outlet to say one of its affiliates had carried out the operation and that France should end its intervention in Mali to ensure the safety of the hostages.
But the militants themselves appeared to have no escape, cut off by surrounding troops and army helicopters overhead. Algerian Interior Minister Daho Ould Kabila said it appeared that the militants were hoping to negotiate their departure away from the area — a notion he rejected.
"Security forces have surrounded the area and cornered the terrorists, who are in one wing of the complex's living quarters," Kabila said.
Kabila dismissed theories that the militants had come from Libya, 60 miles (100 kilometers) away, or from Mali, more than 600 miles (1,000 kilometers) away. He said the roughly 20 well armed gunmen were from Algeria itself, operating under orders from Moktar Belmoktar, al-Qaida's strongman in the Sahara.
Yves Bonnet, the former head of France's spy service, also dismissed the idea that the operation was specifically linked to the French action in Mali due to the amount of organization it involved.
"It was an operation conceived well in advance — spectacular and needing a lot of preparation ... It was not at all an improvised operation," he told the Europe 1 radio. "The operation was probably already scheduled and simply getting all those people into the desert would take several days."
It is certainly the largest haul of hostages since 2003, when the radical group that later evolved into al-Qaida in North Africa snatched 32 Western tourists. This is also the first time Americans have been involved.
BP, the Norwegian company Statoil and the Algerian state oil company Sonatrach, operate the gas field. A Japanese company, JGC Corp, provides services for the facility as well.
It was not immediately possible to confirm the identities of the hostages. Ireland said a 36-year-old Irish man was among them, and Britain and the U.S. said their citizens were taken, without giving numbers. The Norwegian company Statoil said 12 of its employees were captured — nine Norwegians and three locals. Japanese media reported at least 3 Japanese among the hostages and the Malaysian government confirmed two of its citizens were taken.
British Foreign Secretary William Hague told BBC radio on Thursday that he has dispatched a team to Algeria to help at the British embassy there.
"Excuses being used by terrorists and murderers who are involved — there is no excuse for such behavior, whatever excuse they may claim," he said. "It is absolutely unacceptable, of course. It is, in this case, the cold-blooded murder of people going about their business. So there is no excuse, whether it be connected to Libya, Mali or anywhere else."
In Rome on Wednesday, U.S. Defense Secretary Leon Panetta declared that the U.S. "will take all necessary and proper steps" to deal with the attack in Algeria. He would not detail what such steps might be but condemned the action as "terrorist attack."
BP said it would not identify staff members who were taken hostage for security reasons.
"BP's overriding priority is to do all we can to ensure the safety of our staff and to support their families during this anguishing time," BP CEO Bob Dudley said in a statement. "All our efforts are focused on supporting the authorities to secure a peaceful resolution of the situation and the safe return of our colleagues and all other workers being detained."
Schemm reported from Rabat. Associated Press writers Lori Hinnant in Paris and Robert Barr in London, contributed to this report.