Speaking in Australia, foreign secretary William Hague condemns the Algerian jihadists with close ties to al-Qaida Reuters

Algerian troops were in a standoff on Wednesday night with Islamist militants who took at least 20 western contractors hostage in a raid on a desert gas field in which two people were killed, one of them British.

Downing Street said "several British nationals" had been caught up in the attack, which appeared to be in retaliation for France's military intervention in neighbouring Mali.

The Algerian interior minister, Daho Ould Kablia, said that Algerian troops had surrounded a wing of the living quarters at the Ain Amenas gas field on the Algerian border with Libya, where the jihadists were holding the hostages. "We reject all negotiations with the group, which is holding some 20 hostages from several nationalities," Kablia declared on national TV.

Algerian authorities said a Briton and an Algerian had died in the initial attack at dawn and that six people had been wounded – two Britons, a Norwegian and three Algerian security guards.

Foreign secretary William Hague said: "A number of people are held hostage. This does include a number of British nationals. This is therefore an extremely dangerous situation. We are in close touch with the Algerian government, the Algerian military have deployed to the area, and the prime minister has spoken to the prime minister of Algeria."

One militant spokesman claimed that as many as 41 foreigners were being held, but that could not be confirmed. The Algerian Press Service (APS) said Algerian workers at the site were being gradually released in small groups. But a French catering company, CIS, told the BBC that 150 of its Algerian employees were still being held. A spokesman said they were "allowed to move around … unlike the foreign hostages, who are trapped in a corner and cannot move".

Kablia said there were "about 20 terrorists" involved, adding that they had not come from a neighbouring country, implying they were Algerian, and that "they are acting under the orders of" Mokhtar Belmokhtar, an Algerian jihadist with close ties to al-Qaida.

Norway's prime minister Jens Stoltenberg said 13 Norwegians were among the hostages . The country's foreign minister, Espen Barth Eide, said: "We've asked the Algerian authorities to put the life and health of the hostages above all."

Tthe US confirmed that some Americans had been seized; Japanese news agencies, citing unnamed government officials, said there were three Japanese hostages; and Ireland said a 36-year-old Irishman was part of the group. US defence secretary Leon Panetta said Washington "will take all necessary and proper steps" to deal with the attack.

The gas field is operated by BP, in partnership with Norwegian oil company Statoil and Algerian state oil firm Sonatrach, with a Japanese firm, JGC Corp, providing services. BP confirmed that the site had been "attacked and occupied by a group of unidentified armed people".

As night fell, it appeared that the militants and their hostages were still in the gas field complex, ringed by Algerian forces. There were unconfirmed reports that the jihadists had rigged the site with mines or other explosives.

There were claims of responsibility from groups calling themselves the Masked Brigade and Signers in Blood, both names used by followers of Belmokhtar.

They said the attack was a reprisal for the French intervention against a jihadist offensive in Mali, which Algeria has supported by opening its air space to French warplanes.

"It's the United Nations that gave the green light to this intervention and all western countries are now going to pay a price. We are now globalising our conflict," Oumar Ould Hamaha, a close associate of Belmokhtar, told Associated Press by phone.

The US and other European countries have supported the French intervention, Operation Serval, by sending transport planes, while Washington has offered help with transport, intelligence and surveillance.

However, the target of the attack, Ain Amenas, is about 700 miles from the Algerian border with Mali.

British officials speculated that the attack could have been planned long before the French action began last week. One report said the hostage-takers were demanding the release of 100 fellow militants in Algerian jails.

The Algerian interior ministry said the assault began at 5am when heavily armed jihadists arrived at the living quarters on the complex in three vehicles.

"The attack began on a bus which was leaving the base, taking foreigners to the airport in Amenas," according to a statement quoted by the APS. "After this failed, the terrorist group headed towards the camp, taking over part of it and taking hostage an unknown number of workers with foreign nationalities."

The bus attack was repelled by its police escort, the Algerian government said, but the British victim appears to have been killed in that exchange and six others wounded.

The bus managed to escape and the injured were being treated on Wednesday night in the hospital at Ain Amenas. There was an unconfirmed report that a French national had also been killed.

Belmokhtar, a veteran of Algeria's civil conflict, was a deputy commander of al-Qaida in the Islamic Mahgreb (Aqim), until last month when he broke away and set up his own group, to which he has referred as the Masked Brigade and Signers in Blood, dedicated to resisting western efforts to suppress the jihadist uprising that has taken control of northern Mali and spilled into the surrounding region.

Hague said a diplomatic rapid deployment team had been sent to Algiers to reinforce the British embassy and consular staff in Algeria. He added that the government's emergency response committee, Cobra, would continue to meet.