"The hostage-taking involved Britons, Norwegians and Japanese," one Western diplomat told AFP, adding that the Algerian army had launched an operation to try to free the captive staff.
The militants struck a BP plant in Ain Amenas, 1,150 kilometres (720 miles) southeast of Algiers, the diplomats said.
The British Foreign Office confirmed the attack but said it was still seeking details.
"There is a terrorist incident ongoing in the town of Ain Amenas at an oil installation near the Algerian border with Libya. The British embassy is aware of the incident and is liaising with local authorities," a spokeswoman said.
"We are urgently seeking clarification from oil companies in the area as to whether they have personnel involved in the incident," she added.