Fury about a film that insults the Prophet Mohammad tore across the Middle East after weekly prayers on Friday with protesters attacking U.S. embassies and burning American flags as the Pentagon rushed to bolster security at its missions.

At least seven people were killed as local police struggled to repel assaults after weekly Muslim prayers in Tunisia and Sudan, while there was new violence in Egypt and Yemen and across the Muslim world, driven by emotions ranging from piety to anger at Western power to frustrations with local leaders and poverty.

A Taliban attack on a base in Afghanistan that killed two Americans may also have been timed to coincide with protests.

But three days after the amateurish film of obscure origin triggered an attack on the U.S. consulate in the Libyan city of Benghazi that killed the ambassador and three other Americans on September 11, President Barack Obama led a ceremony to honor the returning dead and vowed to “stand fast” against the violence.

“The United States will never retreat from the world,” said Obama, who in seeking re-election must defend his record on protecting U.S. interests, both at embassies and more widely in a region where last year’s Arab Spring revolts overthrew pro-Western autocrats to the benefit of once-oppressed Islamists.

For a third day, television pictures of flames licking around embassy compounds and masked youths exchanging rocks for teargas from riot police were the dominant images of Arab attitudes to Washington. Most diplomatic staff were absent, as most of the region marked the weekend.

But bullets flew. In Tunis, at least two people were killed and 29 were wounded, the government said, after police gunfire near the U.S. embassy in the North African city that was the model for last year’s pro-democracy revolutions.

Counting on Washington for economic aid, Tunisian President Moncef Marzouki condemned what he called “an attack on the embassy of a friendly nation”.

Three died, too, in the Sudanese capital Khartoum, state radio said, while there were also deaths in Cairo and in Lebanon.

As U.S. military drones faced Islamist anti-aircraft fire over Benghazi, about 50 marines landed in Yemen a day after the U.S. embassy there was stormed. For a second day in the capital Sanaa, police battled hundreds of young men around the mission. Washington also sent Marines to reinforce security at its embassy in Sudan.

Egypt’s new Islamist president, Mohamed Mursi, condemned a third day of stone-throwing and siege around the U.S. embassy in Cairo, a linchpin of U.S. policy in the Middle East. Mursi must tread a line between appealing to an electorate receptive to the appeal of more hardline Islamists and maintaining ties with Washington, which long funded the ousted military dictatorship.

KHARTOUM, TUNIS

In Khartoum, wider anger at Western attitudes to Islam also saw the German embassy overrun, with police doing little to stop demonstrators who raised a black Islamist flag. Violence at the U.S. embassy followed protests against both Washington and the Sudanese government, which is broadly at odds with the West.

The wave of indignation and rage over the film, which portrays Mohammad as a womanizer and a fool, coincided with Pope Benedict’s arrival in Lebanon for a three-day visit to a region still in the throes of upheaval and with Christian minorities fearful of the rise of political Islam from Egypt to Syria.

“We were attacked by Obama, and his government, and the Coptic Christians living abroad!” shouted one long-bearded Muslim protester during the Cairo stand-off with police ringing the U.S. embassy. The involvement of a prominent Egyptian-American Christian in promoting the film has caused anger and worry among Christian leaders in Egypt, who condemned the film.

In the restive Sinai peninsula, militants attacked an international military observer base close to the Israeli border, a witness and a security source said. Two Colombian soldiers were wounded, an official from the observer force said.

Libya closed its airspace around Benghazi airport for a time because of heavy anti-aircraft fire by Islamists aiming at U.S. reconnaissance drones flying over the city; Obama, who has sent two warships to the Libyan coast this week, has vowed to bring the killers of ambassador Christopher Stevens to justice.

A Libyan official said the spy planes flew over the embassy compound and elsewhere, hunting strongholds of militant groups.

Further west along the Mediterranean, a Reuters reporter saw police open fire to try to quell an assault in which protesters forced their way past police into the U.S. embassy in Tunis. Some smashed windows, others hurled petrol bombs and stones at police from inside the embassy and started fires. One threw a computer from a window, others looted computers and telephones.

A Tunisian security officer near the compound said the embassy had not been staffed on Friday, and calls to the embassy went unanswered. Two armed Americans in uniform stood on a roof.

The protesters, many of whom were followers of hardline Salafist Islamist leaders, also set fire to the nearby American School, which was closed at the time, and took away laptops. The protests began after Friday prayers and followed a rallying call on Facebook by Islamist activists and endorsed by militants.

Revolution in Tunisia last year was followed by uprisings in Egypt, Yemen and Libya, and an anti-government revolt is still being fought out in Syria. U.S. Secretary of State Hillary Clinton appealed to the peoples of the four hesitant new democracies to resist the men of violence.

“We’ve seen the heavy assault on our post in Benghazi that took the lives of those brave men. We’ve seen rage and violence directed at American embassies over an awful Internet video that we had nothing to do with,” she said in an address before the flag-draped caskets at Andrews Air Force Base near Washington.

“It is hard for the American people to make sense of that because it is senseless and it is totally unacceptable.

“The people of Egypt, Libya, Yemen and Tunisia did not trade the tyranny of a dictator for the tyranny of a mob,” Clinton added. “Reasonable people and responsible leaders in these countries need to do everything they can to restore security and hold accountable those behind these violent acts.”

BASHIR UNDER PRESSURE

President Omar Hassan al-Bashir of Sudan is under pressure from Islamists who feel the government has given up the religious values of his 1989 Islamist coup.

The official body of Sudan’s Islamic scholars called for the faithful to defend the Prophet peacefully, but at a meeting of Islamists, some leaders said they would march on the German and U.S. embassies and demanded the ambassadors be expelled.

Sudan’s Foreign Ministry had criticized Germany for allowing a protest last month by right-wing activists carrying caricatures of the Prophet and for Chancellor Angela Merkel giving an award in 2010 to a Danish cartoonist who depicted the Prophet in 2005 triggering protests across the Islamic world.

Sudan hosted prominent militants in the 1990s, including al Qaeda’s Osama bin Laden. But the government has sought to distance itself from radicals to improve ties with the West.

Palestinians staged demonstrations in both the occupied West Bank and the Gaza Strip.

Israeli police, some on horseback, used stun grenades and made a number of arrests outside Jerusalem’s Old City as a few dozen demonstrators tried to march on the nearby U.S. consulate.

In Nablus, in the northern West Bank, several hundred people protested and burned an American flag, witnesses said.

At least 30,000 Palestinians took part in rallies across the Gaza Strip, which is controlled by the Islamist group Hamas.

In Gaza City, American and Israeli flags were set alight, along with an effigy of the film’s supposed producer.

Protesters in Afghanistan set fire to an effigy of Obama and burned a U.S. flag after Friday prayers in the eastern province of Nangarhar.

Directing their anger against an American Christian pastor who endorsed the film, tribal leaders also agreed to put a $100,000 bounty on his head.

About 10,000 people held a noisy protest in the Bangladeshi capital Dhaka. They burned U.S. flags, chanted anti-U.S. slogans and demanded punishment for the offenders, but were stopped from marching to the U.S. embassy. There was no violence.

Thousands of Iranians held protests nationwide, and there were also rallies in Malaysia, Nigeria, Jordan, Kenya, Bahrain, Qatar, Pakistan and Iraq.