Militants who attacked a natural gas facility in eastern Algeria took as many as 40 people hostage, including three Americans as retaliation for France's intervention in neighboring Mali. NBC's Rohit Kachroo reports.

By Kari Huus, Staff writer, NBC News

Three Americans were among dozens of foreign nationals kidnapped by heavily armed militants who attacked a gas field in Algeria on Wednesday, U.S. officials said.

A militant group claimed the raid was launched in retaliation for France's military intervention in neighboring Mali, Reuters reported, citing local media.

The hostage situation, described as a "terrorist attack" by State Department spokeswoman Victoria Nuland, was unfolding at a gas operation at In Amenas — a joint venture including oil giant BP, the Norwegian oil firm Statoil and the Algerian state company Sonatrach.

BP said in a statement that the site was "attacked and occupied by a group of unidentified armed people."

Reuters said that according to regional media reports, the raiders killed three people, including a Briton and a French national, but there was no way to confirm the account. Reuters did not report the citizenship of the third person.

Al-Qaida in the Islamic Maghreb, which operates across borders in the Sahara desert, claimed it had captured the workers in retaliation for France's intervention in Mali, Reuters reported, citing regional news agencies.

France has been using Algeria's air space for attacks against al-Qaida linked militants in Mali since last week.

Western government officials had not yet linked Wednesday's attack to the conflict in Algeria's southern neighbor. Algeria and neighboring Mali are former colonies of France.

"The Algerian authorities will not respond to the demands of the terrorists and will not negotiate,'' Interior Minister Daho Ould Kablia was quoted as saying by Algeria's official APS news agency.

One of the kidnappers, reportedly contacted by Mauritania's news agency ANI, warned that any attempt to free the hostages would come to a "tragic end." The militants had placed mines around the site of the kidnapping, according to that unconfirmed report.

The U.S. government is in contact with Algerian authorities, the British Embassy in Algiers, BP's security office in London and the Diplomatic Security office in Washington, State Department spokeswoman Victoria Nuland said in a briefing on Wednesday.

French President Francois Hollande said he was also in contact with Algiers and other governments about the attack.

A picture of who was being held hostage — with various reports that the total number was 41 — remains incomplete, but citizens of at least six countries are in the group.

There are three Americans in the group, a senior U.S. official told NBC. An earlier report had put the number at seven.

The State Department’s Nuland confirmed that Americans were among the hostages, but she would not release names, numbers and other details "in order to protect their safety."

Norwegian Prime Minister Jens Stoltenberg told a news conference that 13 Norwegian citizens were among the hostages. Three Algerian Statoil employees and one Canadian were in the hostage group, the company said. Statoil is a minority shareholder in the venture.

One Irish national was abducted, an Irish government official said, and British Prime Minister David Cameron said "several" British citizens were among the hostages.

A spokesman for the Japanese government said it had set up a task force to investigate reports of Japanese hostages.

A reporter for Japan's NHK television managed to call a Japanese worker in Algeria, Reuters reported. The worker said he got a phone call from a colleague at the gas field.

"It was around 6 a.m. this morning. He said that he had been hearing gunshots for about 20 minutes," the worker said. "I wasn't able to get through to him since."

The U.S. government issued an emergency message to Americans in the country through the embassy in Algiers, warning them to avoid large gatherings, protests or demonstrations.

"U.S. citizens should review their personal security plans, remain aware of their surroundings, including local events, and monitor local news stations for updates," it read, in part. "Maintain a high level of vigilance and take appropriate steps to enhance your personal security and follow instructions of local authorities.

The Amenas gas field is about 800 miles southeast of Algiers and about 35 miles west of the Libyan border.

Oil major BP said it believed the operation had been shut down after the attack, which took place at about 5 a.m. local time. The company said the field had been producing about 160,000 barrels of oil equivalent per day — more than 10 percent of the country's overall gas output, Reuters reported.