Two British hostages, Peter, left, and Alan, are seen after being released in In Amenas. / Anis Belghoul, AP

by Jabeen Bhatti, Special for USA TODAY

by Jabeen Bhatti, Special for USA TODAY

Three Americans were among 38 workers killed in the siege of an Algerian gas plant in which Islamic terrorists used hostages as human shields after their attempted mass kidnapping for ransom went awry, U.S. and Algerian officials said Monday.

The State Department on Monday said Americans Victor Lynn Lovelady, Gordon Lee Rowan and Frederick Buttaccio died in the four-day standoff between a Muslim jihadist group and the Algerian military.

"As the president said, the blame for this tragedy rests with the terrorists who carried it out, and the United States condemns their actions in the strongest possible terms," spokeswoman Victoria Nuland said.

Nuland said seven U.S. citizens survived the attack. Buttaccio and Lovelady were identified as Houston residents, according to the Associated Press. A hometown for Rowan was not released.

A Colorado man survived the hostage crisis by hiding from the terrorists for 2 ½ days before escaping to a nearby Algerian military base.

Earlier Monday, Algeria's prime minister said the terror attack was orchestrated by a Canadian citizen and the attackers wore Algerian military uniforms and had cohorts working inside the plant.

The dead hostages represented at least eight countries. Five foreign workers remained unaccounted for, Sellal said, saying they may have been killed, escaped or held in captivity by terrorists who got away.

He said 29 terrorists were killed during assaults by Algerian military forces to end the four-day standoff and "a few" may have escaped after having used hostages as shields from the Algerian military. Sellal said the terrorists came from Egypt, Canada, Mali, Niger, Mauritania and Tunisia, and that three were captured.

Algerian special forces stormed the plant on Saturday to end the siege, moving in to thwart what government officials said was a plot by the Islamist terrorists to blow up the complex and kill all their hostages with mines sown throughout the site.

On Sunday, Algerian bomb squads sent in to blow up or defuse the explosives found 25 bodies, said a security official, who spoke on condition of anonymity because of the sensitivity of the situation.

"These bodies are difficult to identify. They could be the bodies of foreign hostages or Algerians or terrorists," the official said.

Special forces continue to secure the facility and look for more victims, said Algerian spokesman Mohamed Said.

The plant was a joint venture operated by British firm BP, Statoil of Norway and Sonatrach of Algeria. Hundreds of workers were employed at the plant, including many foreigners.

The attack began early Wednesday with the attempted hijacking of two buses filled with workers outside the complex. Repelled by Algerian forces, the militants moved on the main complex, armed with missiles, mortars and bombs for their three explosives experts, Sellal said. They split into two groups, with one infiltrating the complex's living quarters and the other the gas plant.

The prime minister said the heavily armed militants had prepared the attack for two months. He said the attackers arrived from northern Mali and had planned to return there with the foreign hostages.

In a statement, the Masked Brigade, the group that claimed to have masterminded the takeover, warned of more attacks against any country backing military intervention in neighboring Mali, where the French are trying to stop an advance by Islamist extremists.

Algeria, despite its reservations about the French decision, is allowing French jets to overfly.

Sellal said negotiating was essentially impossible.

"Their goal was to kidnap foreigners," he said. "They wanted to flee to Mali with the foreigners, but once they were surrounded, they started killing the first hostages."