Several people were also wounded when the bus carrying the workers, including several British nationals, was targeted by dozens armed with an array of weapons, including mortars and anti-aircraft missile, near In Amenas.
The militant group, which may be al Qaeda-affiliated, is thought to be holding all hostages inside the plant and were threatening to blow it up.
One worker claims the group had demanded the release of 100 Islamists held in Algeria.
The state-run APS news agency said Algerian workers had been released.
There were claims of responsibility by a group called Katibat Moulathamine, or the Masked Brigade, and by another calling itself Signers in Blood. It is possible both are names for the same faction linked to a former al Qaeda leader called Mokhtar Belmokhtar.
The Masked Brigade claimed three Norwegians, a Briton and an American were being held. The Signers in Blood claimed they had 41 Western nationals, including seven Americans, some French, British and Japanese.
Both groups said the raid had been carried out because of Algeria's decision to allow France to use its airspace for attacks against Islamists in Mali, where French forces have been in action against militants since last week.
Algerian forces surrounded the kidnappers, and negotiations for the release of the hostages were ongoing.
Mauritania's ANI agency said a gun battle had taken place last night with the Algerian soldiers, who were forced to retreat.
Gatwick-based company Jet Air is among those who have now suspended flights from the UK to southern Algeria.
BP, which operates the In Amenas field in a joint venture with Sonatrac, the Algerian national oil company, and Norway's Statoil, said the attack was by "unidentified armed people", who are now occupying the site and that some of its employees were believed to have been taken captive.
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.
"The Algerian authorities will not respond to the demands of the terrorists and will not negotiate," Interior Minister Daho Ould Kablia said.
The ministry said three vehicles had attacked the bus carrying workers from the In Amenas gas field at about 5am local time. The attack was "repelled by the escort units", but there were casualties.
"After their failed attempt, the terrorist group headed to the complex's living quarters and took a number of workers with foreign nationalities hostage," the ministry added. "The forces of the People's National Army and security services arrived at the scene and immediately took all necessary measures to make the area secure."
There was confusion over the number and identities of the hostages, but Ireland announced that a 36-year-old married Irish man was among them.
The Norwegian Prime Minister's office said 13 Norwegians, all employees of Statoil, were at the gas facility when it was taken over by the militants.
David Cameron chaired a 45-minute meeting of the Government's Cobra crisis committee. A spokesman for the PM said: "This is an ongoing incident involving various nationalities, including several British nationals. We are working with BP to support the families of the staff. The PM will be speaking to his Algerian counterpart. The situation is sensitive and ongoing."