A film attacking the prophet Muhammad sparked assaults on US diplomatic missions during which an American was said to have been shot dead as protesters burned the US consulate in Benghazi, Libya.
In Cairo, Egypt, protesters scaled the walls of the US embassy walls and replaced an American flag with an Islamic banner.
It was the first such assaults on US diplomatic buildings in either country, at a time when both Libya and Egypt are struggling to overcome the turmoil following the removal of their long-time leaders, Muammar Gaddafi and Hosni Mubarak in uprisings last year.
The protests in both countries were sparked by outrage over a film ridiculing Muhammad produced by an American in California and being promoted by an extreme anti-Muslim Egyptian Christian campaigner in the United States.
In Benghazi, a large mob stormed the US consulate, with gunmen firing their weapons, said Wanis al-Sharef, an Interior Ministry official. A witness said attackers fired automatic weapons and rocket-propelled grenades at the consulate as they clashed with Libyans hired to guard the building.
Outnumbered by the crowd, Libyan security forces did little to stop them, Mr al-Sharef said. The crowd overwhelmed the consulate and set fire to it, burning most of it and looting the contents, witnesses said.
One American was shot dead and a second was wounded in the hand, Mr al-Sharef said. He did not give further details, and there was no immediate US confirmation of the death.
Hours before the Benghazi attack, hundreds of mainly ultra-conservative Islamist protesters in Egypt marched to the US embassy in Cairo, gathering outside its walls and chanting against the movie and the US. Most of the embassy staff had left the compound earlier because of warnings of the upcoming demonstration.
Dozens of protesters then scaled the embassy walls, and several went into the courtyard and took down the American flag from a pole. They brought it back to the crowd outside, which tried to burn it, but failing that, tore it apart.
The crowd grew throughout Tuesday evening with thousands standing outside the embassy. Dozens of riot police lined up along the embassy walls but did not stop protesters as they continued to climb and stand on the wall - though it appeared no more went into the compound. By midnight, the crowd had dwindled. The US embassy said on its Twitter account that there would be no visa services today because of the protests.