A US official has been killed and others wounded after militiamen stormed the US consulate in the Libyan city of Benghazi, security officials say.
It is believed the protest was held over a US-produced film that is said to be insulting to the Prophet Muhammad.
The building is said to have burnt down after being set alight by protesters. It is thought nobody was in the consulate at the time.
Protests have also been held at the US embassy in the Egyptian capital, Cairo.
Witnesses say the protest in Benghazi prompted a confrontation between government security forces and an armed militia known as the Ansar al-Sharia brigade, the BBC’s Rana Jawad in Tripoli reports.
“One American staff member has died and a number have been injured in the clashes,” Abdel-Monem Al-Hurr, spokesman for Libya’s Supreme Security Committee, told Reuters news agency.
The identity of the US official killed is not yet known.
The US said it condemned the attack “in the strongest terms” and was working with Libyan security forces to secure the compound, a statement by US state department spokeswoman Victoria Nuland said.
The film that sparked the demonstration is said to have been produced by some Egyptian Copt expatriates. A trailer of it has appeared on YouTube in Arabic.
There were calls on social media networks for protests against US interests in the capital, Tripoli, but no disturbances have been confirmed, our correspondent says.
In Cairo, the United States flag, which was flying at half mast to mark the 9/11 attacks, was torn down earlier by demonstrators and replaced by an Islamist banner.
Thousands of protesters had gathered outside the US embassy in the Egyptian capital.
Egyptian protesters condemned what they said was the humiliation of the Prophet of Islam under the pretext of freedom of speech.
“Both Muslims and Christians are participating in this protest against this offence to Islam,” said one protester, according to the Associated Press.
The US embassy earlier issued a statement condemning “the continuing efforts by misguided individuals to hurt the religious feelings of Muslims – as we condemn efforts to offend believers of all religions”.
The statement added: “We firmly reject the actions by those who abuse the universal right of free speech to hurt the religious beliefs of others.”
There were no reports of injuries, the state department said.