Algerian state media said one of those killed was a British national, but this has not been confirmed by the British Foreign Office.
Two policemen and four workers, including two foreigners, were among those wounded in the attack on the In Amenas gas field near the border with Libya.
A spokesperson for the attackers claim 41 people have been taken hostage, including seven Americans and expatriates from France, Britain and Japan.
The Algerian Interior Ministry said: "a group of terrorists, heavily armed, arrived in three vehicles" early on Wednesday morning and tried to attack a bus transporting foreigners from the gas field to In Amenas airport, but they were repelled by an escorting convoy.
It said the militants then headed towards a compound for workers at Tigantourine, near In Amenas, and took a number of workers hostage, including expatriates.
Earlier, an Algerian member of parliament said four Japanese and one Frenchman were kidnapped in the raid. A man from Northern Ireland who holds an Irish passport was among the hostages, the Irish foreign ministry said.
A Norwegian man was also kidnapped, according to an interview the man's wife gave to Norwegian newspaper BT Daily.
One of the attackers told news agency AFP they were Al-Qaeda loyalists who had slipped into Algeria from northern Mali.
“We belong to the Khaled Abul Abbas Brigade led by Mokhtar Belmokhtar,” he said, referring to one of the leaders of Al-Qaeda in the Islamic Maghreb [Aqim].
A Western diplomat also told AFP the Algerian army had launched an operation to try to free the hostages.
BP confirmed the attack on the field, which is a joint venture with the Norwegian state oil company Statoil and the Algerian state-owned oil firm Sonatrach.
Statoil said it had just under 20 employees at the facility, of whom more than 10 were Norwegian.
The motives behind the attack are unclear.
Algeria announced on Tuesday that it had closed its border with Mali following a French military offensive against Islamic militant fighters in northern Mali.