The Algerian military operation to free hostages being held by Islamist militants at a desert gas plant is now over, state news agency APS reports.
State TV said four foreign hostages were killed in the operation. Others were freed, but there was no confirmation of how many survived.
AFP news agency quoted officials as saying the army had not secured the whole site, which was being searched.
Al-Qaeda-linked fighters occupied the facility near In Amenas on Wednesday.
Reports suggest the facility is still being searched.
During the Algerian military intervention on Thursday as many as 600 Algerians and four foreign hostages – two from Scotland, one from France and one from Kenya – were freed, APS reported.
The Irish government confirmed that one of its citizens was free. Five American hostages had survived and had left the country, US officials were quoted as telling ABC News.
Earlier, the militants reportedly said that at least 34 hostages and 14 kidnappers died, and that seven foreign hostages had survived.
They had claimed to be holding 41 foreign nationals, believed to include British, Japanese, US and Norwegian citizens, in retaliation for French military intervention in neighboring Mali.
Some workers were reported to have been freed or to have escaped before the Algerian raid.
Algerian Communications Minister Mohamed Said Belaid said a “significant number of terrorists” were killed during the raid.
He added: “Unfortunately, we deplore some deaths and some people wounded. We don’t yet have the numbers.”
Details of how the raid unfolded were slow to emerge.
APS reported that the Algerian military, which had been surrounding the gas plant, had targeted two vehicles as they tried to escape from the site with an unknown number of people on board.
Militants told local media that Algerian forces had opened fire from the air.
Norwegian Prime Minister Jens Stoltenberg said he was told by his Algerian counterpart that Algerian authorities had tried and failed to find a solution to the stand-off on Wednesday night. “The Algerian prime minister said they felt they had no choice but to go in,” he said.
British Prime Minister David Cameron was informed that the raid was under way when he called the Algerian Prime Minister at 11.30 GMT, a spokesman said.
David Cameron, who cancelled a key speech on Europe scheduled for Friday, made it clear that he would have preferred to have been told in advance, the spokesman added.
Japan’s government protested against the raid, urging Algeria “put the highest priority on people’s lives”. The US said it was “seeking clarity” on what had happened.
Algerian Interior Minister Daho Ould Kablia said the kidnappers were Algerian and operating under orders from Mokhtar Belmokhtar, a senior commander of al-Qaeda in the Islamic Maghreb (AQIM) until late last year.
Daho Ould Kablia said they had entered Algeria from Libya, AFP reported.
Two people were killed when militants attacked the gas plant.
The Tigantourine gas facility is about 40 km (25 miles) south-west of In Amenas, which is close to the Libyan border and about 1,300km (800 miles) south-east of Algiers.
BP operates the gas field jointly with Algerian state oil company Sonatrach and Norwegian firm Statoil.