CAIRO — The violently anti-American rallies that have roiled the Islamic world over a video denigrating the Prophet Muhammad expanded on Friday to more than a dozen countries, with demonstrators breaching the United States Embassy in Tunisia for the first time and protesters in Sudan’s capital broadening the targets to include Germany and Britain.


The broadening of the protests appeared unabated by calls for restraint from the new Islamist president of Egypt, where the demonstrations first erupted four days ago on the anniversary of the Sept. 11, 2001, attacks. In Washington, the Pentagon announced that it was dispatching 50 Marines to secure the American diplomatic compound in Yemen’s capital, which was partly defiled by enraged protesters on Thursday. At a bazaar about 30 miles east of Jalalabad, Afghanistan, protesters burned an effigy of President Obama.


The breaching of the United States Embassy in Tunis, the birthplace of the Arab Spring revolutions, was at least the fourth time that an American diplomatic facility in the Middle East had been violated since the protests began. There were also unconfirmed reports from Tunis that protesters had torched an American school.


Germany’s foreign minister, Guido Westerwelle, told reporters at the Foreign Ministry in Berlin that the country’s embassy in Khartoum, Sudan, had been “stormed and in part set aflame” in an attack by “demonstrators capable of violence.” According to Mr. Westerwelle, embassy employees were safe. German missions in Muslim countries had already strengthened security measures because of the unrest.


The police fired tear gas to drive off the attacks in Khartoum, where about 5,000 demonstrators massed on the German and British Embassies, a witness told the Reuters news agency.


Thousands of Palestinians joined demonstrations after Friday Prayer in the Gaza Strip. Since there is no American diplomatic representation in Gaza, the main gathering took place in Gaza City, outside the Parliament building, where American and Israeli flags were placed on the ground for the crowds to stomp. Some demonstrators chanted, “Death to America and to Israel!” Palestinians also clashed with Israeli security forces in Jerusalem and held protests in the West Bank.


Witnesses in Cairo said protests that first flared on Tuesday — the day J. Christopher Stevens, the American ambassador in Libya, was killed in an attack in neighboring Libya — continued sporadically Friday, with protesters throwing rocks and gasoline bombs near the American Embassy and the police firing tear gas. The bodies of Mr. Stevens and three other Americans killed in the Libya attack were being returned to the United States on Friday.


In Lebanon, one person was killed and 25 injured as protesters attacked restaurants. There was also turmoil in Yemen, Bangladesh, Qatar, Kuwait and Iraq, and demonstrations in Malaysia. In Nigeria, troops fired into the air to disperse protesters marching on the city of Jos, Reuters reported.


State media in Egypt said more than 220 people had been injured in the clashes since Tuesday.


The widening unrest has challenged the Obama administration’s policy in the tinderbox region where the Arab Spring uprisings have removed many of the pro-American strongmen who once kept public displays of Islamic passion in check.


In Yemen, baton-wielding security forces backed by water cannons blocked streets near the American Embassy a day after protesters breached the outer security perimeter there and officials said two people were killed in clashes with the police. Still, a group of several dozen protesters gathered near the diplomatic post, carrying placards and shouting slogans.


In Lebanon, hundreds of protesters set alight a KFC restaurant in the northern city of Tripoli on Friday, witnesses said, chanting against Pope Benedict XVI’s visit to the country and shouting anti-American slogans, according to a Reuters report.


In Iraq, where the heavily fortified American Embassy sits on the banks of the Tigris inside the Green Zone and is out of reach to ordinary Iraqis, thousands protested after Friday Prayer, in Sunni and Shiite cities alike.