A squad of U.S. troops dispatched by helicopter across the Libyan desert to rescue besieged diplomats from Benghazi on Wednesday ran into a fierce overnight ambush that left a further two Americans dead, Libyan officials told Reuters.

Accounts of the mayhem at the U.S. consulate, where the ambassador and a fourth American died after a chaotic protest over a film insulting to Islam, remain patchy. But two Libyan officials, including the commander of a security force which escorted the U.S. rescuers, said a later assault on a supposedly safe refuge for the diplomats appeared professionally executed.

Miscommunication which understated the number of American survivors awaiting rescue - there were 37, nearly four times as many as the Libyan commander expected - also meant survivors and rescuers found themselves short of transport to escape this second battle, delaying an eventual dawn break for the airport.

Captain Fathi al-Obeidi, whose special operations unit was ordered by Libya's authorities to meet an eight-man force at Benghazi airport, said that after his men and the U.S. squad had found the American survivors who had evacuated the blazing consulate, the ostensibly secret location in an isolated villa came under an intense and highly accurate mortar barrage.

"I really believe that this attack was planned," he said, adding to suggestions by other Libyan officials that at least some of the hostility towards the Americans was the work of experienced combatants. "The accuracy with which the mortars hit us was too good for any regular revolutionaries."

Obeidi's Libya's Shield Brigade was formed by civilians during last year's U.S.-backed uprising against Muammar Gaddafi and is now part of the ad hoc government militia forces which the fledgling democratic administration uses to keep order.

Other Libyan officials cited the possible involvement of former soldiers still loyal to Gaddafi's family or Islamist fighters, some of whom have trained and fought in Afghanistan.

U.S. officials have noted it was "complex attack". Several Libyan officials and witnesses said an initial demonstration at the consulate appeared to be largely unarmed, though some elements of an Islamist militia were spotted.

At some point, the crowd became incensed, believing they were under attack from within the consulate, many fetched weapons and the consular villa ended up in flames, with most of the Americans fleeing to the safe house after two, including ambassador Christopher Stevens, had been fatally injured.

"Raining down fire"

Of the eight American troops who had come from Tripoli, one was killed and two were wounded, Obeidi said. A Libyan deputy interior minister said a second American was also killed in the attack on the safe house. It was not clear if this was a diplomat or one of the consulate's original security detail.

"It began to rain down on us," Obeidi told Reuters, describing the moment the attack began - just as the Libyan security force was starting up the 10 pickup trucks and sedans they had brought to ferry the Americans to the airport.

"About six mortars fell directly on the path to the villa," he said. "During this firing, one of the marines whom I had brought with me was wounded and fell to the ground.

"As I was dragging the wounded marine to safety, some marines who were located on the roof of the villa as snipers shouted and the rest of the marines all hit the ground.

"A mortar hit the side of the house. One of the marines from the roof went flying and fell on top of us."

A senior U.S. diplomat - not ambassador Stevens, who Libyan officials said died at a local hospital of the effects of smoke - urged Obeidi to push ahead with the evacuation, the Libyan commander Obeidi said. But he had a transport problem.

Having been told to expect 10 Americans and having found 37, Obeidi did not have enough vehicles to break out, despite having one heavy anti-aircraft gun mounted on a pickup truck.

"I was being bombarded by calls from all over the country by Libyan government officials who wanted me to hurry and get them out," he said. "But I told them that we were in such difficult circumstances and that I needed more men and more cars."

Eventually dozens more vehicles were dispatched from pro-government militia brigades and, with the sun rising, the convoy headed back to the airport where an aircraft flew a first group of U.S. personnel out to the Libyan capital.

Libyan Deputy Interior Minister Wanis al-Sharif said Stevens and another diplomat died in the first series of incidents around the consulate, while the other two Americans died during the attempt to evacuate from the safe house to the airport.

"(The ambassador) died as a result of suffocation by the fumes of the fire inside the embassy and one was also killed by gunfire before around 37 people were moved to a place we thought was safe," Sharif told Reuters in Benghazi.

Speaking of the rescue mission, he said: "A team of commandos arrived by air and went to a farm which we thought was a secret location. Once they got there, they came under heavy fire from heavy machineguns, rocket-propelled grenades and automatic rifles, which resulted in the death of two others."

Haaretz.com, the online edition of Haaretz Newspaper in Israel, and analysis from Israel and the Middle East. Haaretz.com provides extensive and in-depth coverage of Israel, the Jewish World and the Middle East, including defense, diplomacy, the Arab-Israeli conflict, the peace process, Israeli politics, Jerusalem affairs, international relations, Iran, Iraq, Syria, Lebanon, the Palestinian Authority, the West Bank and the Gaza Strip, the Israeli business world and Jewish life in Israel and the Diaspora.