The hostage-taking at a remote Algerian gas plant was carried out by 30 militants from across the northern swath of Africa and two from Canada, authorities said. The militants, who wore military uniforms and knew the layout, included explosives experts who rigged it with bombs and a leader whose final order was to kill all the captives.
The operation also had a participant with inside knowledge - a former driver at the plant, Algeria's prime minister said Monday.
In all, 38 workers and 29 militants died, the Algerian prime minister said Monday, offering the government's first detailed account of four days of chaos that ended with a bloody military raid, which he defended as the only way possible to end the standoff. Five foreigners are still missing.
Algerian Prime Minister Abdelmalek Sellal told reporters that the terrorist chief "gave the order for all the foreigners to be killed, so there was a mass execution. Many hostages were killed by a bullet to the head."
Monday's account offered the first Algerian government narrative of the standoff, from an attempted bus hijacking on Wednesday to the moment Saturday when the attackers prepared to detonate bombs across the sprawling complex. That's when Algerian special forces moved in for the second and final time.
All but one of the dead victims - an Algerian security guard - were foreigners. The dead hostages included seven Japanese workers, six Filipinos, three energy workers each from the U.S. and Britain, two from Romania and one worker from France.
The prime minister said three attackers were captured, but did not specify their nationalities.
He said the Islamists included a former driver at the complex from Niger and that the militants "knew the facility's layout by heart." The vast complex is deep in the Sahara, 800 miles south of Algiers, with a network of roads and walkways for the hundreds of workers who keep it running.
The Algerian premier said the Canadians among the militants were of Arab descent, and that the militant cell also included men from Egypt, Mali, Niger, Mauritania and Tunisia, as well as three Algerians.
Earlier reports of as many as 81 deaths in the assault appear to have overstated the toll in the chaotic aftermath.