BENGHAZI, Libya (AP) — Heavily armed militants used a protest of an anti-Islam film as a cover in their deadly attack on the US Consulate, screaming “God is great!” as they scaled its outer walls and descended on the main building, a witness and a senior Libyan security official said Thursday.

The account, the most detailed yet of the rampage that killed the U.S. ambassador and three other Americans, came as the Libyan government said four people suspected in the attacks had been arrested and more were being sought.

The security official, eastern Libya’s deputy interior minister, Wanis el-Sharef, said it was a two-pronged attack. He said that hours after the crowd stormed the consulate Tuesday night, the militants raided a safe house in the compound just as US and Libyan security arrived to evacuate the staff, suggesting infiltrators within the security forces may have tipped off the militants to the location of the safe house.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The attacks were suspected to have been timed to coincide with the 11th anniversary of the Sept. 11, 2001, terrorist strike in the United States, el-Sharef added, with the militants using the film protest by Libyan civilians to mask their action.

Killed in the attack were U.S. Ambassador Chris Stevens, information management officer Sean Smith, private security guard Glen Doherty and one other American who has yet to be identified.

El-Sharef said the four were arrested from their homes on Thursday but would give no further details. He said it was too early to say if they belonged to a particular group or what their motive was. Libya’s new prime minister, Mustafa Abu-Shakour, said authorities were looking for more suspects.

One of five private security guards at the consulate said the surprise attack began around 9:30 p.m. when several grenades that were lobbed over the outer wall exploded in the compound and bullets rained down.

The guard was wounded in the left leg from shrapnel. He said he was lying on the ground, bleeding and in excruciating pain when a bearded gunman came down the wall and shot him twice in the right leg, screaming: “You infidel, you are defending infidels!”

“Later, someone asked me who I was. I said I was the gardener and then I passed out. I woke up in hospital,” said the guard, who spoke to The Associated Press from his bed at a Benghazi hospital. He spoke on condition of anonymity because he feared reprisals and reprimands from his employers.

The witness account came as protests of the obscure film, “Innocence of Muslims,” continued in the Middle East.

An angry throng broke into the US Embassy in Yemen, and clashes between security forces and demonstrators near the fortress-like embassy compound in the heart of Cairo left nearly 200 people injured and two police trucks burned.

Speaking at his Benghazi office, el-Sharef, who was running the Interior Ministry’s operations room commanding security forces in the city during the attack, gave the most detailed account to date to come out of Libya of what happened the night of the attack. His version, however, leaves some questions unanswered and does not provide a definitive explanation on the motives behind the attack and the identity of the perpetrators.

Killed in the attack were US Ambassador Chris Stevens, information management officer Sean Smith, private security guard Glen Doherty and one other American who has yet to be identified.

No one has claimed responsibility for the attack. Some Libyan officials have pointed the finger at a hardline Islamist militia, the Ansar al-Shariah Brigades, one of multiple Libyan militias operating in the city. A spokesman for the group lavishly praised the assault for “protecting the faith and fighting for the victory of God Almighty.” But he said the Brigades “did not participate as an organization. This was a popular uprising.”

Adding to the confusion surrounding the attack is that it targeted the United States, a nation that played a key role in ridding the oil-rich, mostly desert nation of dictator Moammar Gadhafi. Washington also took the lead in launching the months-long NATO air campaign that crippled the late leader’s forces.

Stevens was credited by most Libyans with organizing a political front made up of opposition groups to unite the uprising against Gadhafi’s 41-year rule, mediating tribal and regional disputes.

The Benghazi attack also underlined the precarious conditions in Libya nearly a year after Gadhafi’s fall, with a weak central government, militias operating as local governments, a destabilizing proliferation of weapons, and militant groups — some inspired by al-Qaida — that are active under the government’s radar.

Stevens and another American were killed in the consulate during the initial violence, as plainclothes Libyan security were evacuating the consulate’s staff to the safe house about a mile away, el-Sharef said. The second assault took place several hours later and targeted the safe house — a villa inside the grounds of the city’s equestrian club — killing two Americans and wounding a number of Libyans and Americans.

The crowd built at the consulate — a one-story villa surrounded by a large garden in an upscale Benghazi neighborhood — in several stages, El-Sharef said. First, a small group of gunmen arrived, then civilians angry over the film. Later, heavily armed men with armored vehicles, some with rocket-propelled grenades, joined and the numbers swelled to more than 200.

The gunmen fired into the air outside the consulate. Libyan security guarding the site pulled out because they were so outmanned. “We thought there was no way for the protesters to storm the compound, which had fortified walls,” he said.

Libyan security advised the Americans to evacuate at that point, but the advice was ignored, he said. There was shooting in the air from inside the consulate compound, he said.

At this point, el-Sharef continued, the crowd stormed the compound. The consulate was looted and burned, while plainclothes security men were sent to evacuate the personnel.

Stevens probably died of asphyxiation following a grenade explosion that started a fire, el-Sharef said, echoing what the Libyan doctor to whom Stevens’ body was taken told the AP on Wednesday.

His account was corroborated by local journalist Ibrahim Hadya, who was at the scene. He told the AP that the consulate was stormed just as the evacuation was under way, with staff members smuggled out a side door that opens to a street other than the one where the militants and protesters gathered.

US officials have said attackers broke into the main consulate building around 10:15 p.m. and set the compound on fire. Amid the evacuation, Stevens became separated from others, and staffers and security who tried to find him were forced to flee by flames, smoke and gunfire. After an hour, according to US officials, US and Libyan officials drove the attackers from the consulate.

The next attack came hours later. Around 30 American staffers along with Libyans had been evacuated to the safe house while a plane arrived from Tripoli with a joint US-Libyan security group that was to fly them back to the capital, el-Sharef said.

El-Sharef said the original plan was for a separate Libyan security unit to escort the evacuees to the airport. Instead, the joint unit went from the airport to the safe house, possibly because they were under the impression they were dealing with a hostage situation, he said. The militant attack coincided with the joint team’s arrival at the safe house, he said.

That the attackers knew the safe house’s location suggests a “spy” inside the security forces tipped off the militants, el Sharef said.

U.S. officials have not confirmed the account. They have spoken of an attack on the consulate’s annex that killed two Americans, but said their report on the incident was still preliminary.

In Yemen’s capital of Sanaa, hundreds of protesters chanting “death to America” and “death to Israel” stormed the US Embassy compound and burned the American flag on Thursday.

Yemen’s president, Abed Rabbo Mansour Hadi, quickly apologized to the US and vowed to track down the culprits, just as Libya’s president did. Egypt’s Islamist President Mohammad Morsi, who had been slow to speak out on Tuesday’s assault on the embassy in Cairo, promised Thursday that his government would not allow attacks on diplomatic missions.

The crowd in Sanaa swarmed over embassy’s entrance gate. Men with iron bars smashed the thick, bullet-proof glass windows of the entrance building while others clambered up the wall. Some ripped the embassy’s sign off the outer wall.

Inside the compound grounds, they brought down the American flag in the courtyard and replaced it with a black banner bearing Islam’s declaration of faith — “There is no God but Allah.” They did not enter the main building housing the embassy’s offices, some distance away from the entry reception. Demonstrators set tires ablaze and pelted the compound with rocks.

A thick column of black smoke rose out from inside the embassy compound. Witnesses said the protesters set ablaze a room housing security guards and torched several parked cars.

Yemeni security forces who rushed to the scene fired in the air and used tear gas to disperse the demonstrators, driving them out of the compound after about 45 minutes and sealing off the surrounding streets.

The embassy said nobody was harmed. “All embassy personnel are safe and accounted for,” spokesman Lou Fintor said.

Yemen is home to al-Qaida’s most active branch and the United States is the main foreign supporter of the Yemeni government’s counterterrorism campaign. The government on Tuesday announced that al-Qaida’s No. 2 leader in Yemen was killed in an apparent U.S. airstrike, a major blow to the terror network.

In Cairo, protesters clashed Thursday with police near the US Embassy. Police used tear gas to disperse he protesters and the two sides pelted each other with rocks. But unlike Tuesday, when protesters climbed the embassy’s walls and several of them breached its grounds, police kept the protesters away from the compound.

The Health Ministry said 224 people, including policemen, were wounded, but they mostly suffered light injuries. Twelve protesters have been arrested.

The clashes continued well into the night.

The spreading violence comes as outrage grows over a movie called “Innocence of Muslims” produced by anti-Islam campaigners in the US that mocked Islam’s Prophet Muhammad. The amateurish video was produced in the US and excerpted on YouTube. It depicts Muhammad as a fraud, a womanizer and a madman in an overtly ridiculing way, showing him having sex and calling for massacres.

___

Hendawi reported from Cairo. Associated Press writer Maggie Michael in Cairo contributed to this report.

Copyright 2012 The Associated Press.