A US state department official was killed and at least one other American was wounded when a gunmen stormed the US consulate in the eastern Libyan city of Benghazi.
It is believed the protest was held over a US-produced film that is said to be insulting to the Prophet Muhammad.
The militiamen raided the compound with grenades before setting it on fire.
On Tuesday, protesters against the film breached the walls of the US embassy in the Egyptian capital, Cairo.
The film that sparked the demonstration is said to have been produced by a US citizen from California named Sam Bacile, and promoted by an expatriate Egyptian Copt.
The two men are described as having anti-Islamic views.
A trailer of the low-budget movie has appeared on YouTube translated into Arabic.
The video, called Innocence of Muslims, is shot in English, but provides Arabic subtitles.
It was written, directed and produced by Israeli-American real-estate developer Sam Bacile in California, according to the Wall Street Journal.
Sam Bacile, 52, told the paper that he regards Islam as a “cancer” and was able to produce the film with $5 million that he raised with the help of about 100 Jewish donors.
The film depicts Muhammad as a fraud, showing him having sex and calling for massacres.
Throughout the video, “Muhammad” – portrayed by an American actor – is branded a “bastard”, “rapist” and “child molester” by other actors in the film.
A US state department official was killed when a gunmen stormed the US consulate in the eastern Libyan city of Benghazi
Muslims find it offensive to depict Muhammad in any fashion, much less in an insulting way.
Ultra-conservatives have claimed the actions are a protest against the film, which they say attacks Islam’s prophet, Muhammad, and is a form of blasphemy.
In the attack in Benghazi, unidentified armed men stormed the grounds, shooting at buildings and throwing handmade bombs into the compound.
Security forces returned fire but Libyan officials say they were overwhelmed.
“One American official was killed and another injured in the hand. The other staff members were evacuated and are safe and sound,” Libya’s deputy interior minister Wanis al-Sharif told AFP news agency.
The identity of the US official killed is not yet known. The consular worker was reported to have been shot.
In a statement, Secretary of State Hillary Clinton confirmed the death, saying: “We are heartbroken by this terrible loss.”
“Some have sought to justify this vicious behavior as a response to inflammatory material posted on the Internet,” she said in a statement.
“The United States deplores any intentional effort to denigrate the religious beliefs of others. But let me be clear: There is never any justification for violent acts of this kind.”
Reports say a militia known as the Ansar al-Sharia brigade was involved in the attack, but the group has denied the claim.
Many people are still armed following the conflict that overthrew Col. Muammar Gaddafi last year.
There were calls on social media networks for protests against US interests in the capital, Tripoli, but no disturbances have been confirmed.
The rally followed a demonstration in Cairo, in which protesters breached the US embassy and tore down the United States flag, which was flying at half mast to mark the 9/11 attacks, and replaced it with 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 Associated Press news agency.
US Republican presidential contender Mitt Romney criticized President Barack Obama for his response to the protests.
“It’s disgraceful that the Obama administration’s first response was not to condemn attacks on our diplomatic missions, but to sympathize with those who waged the attacks,” Mitt Romney said in a statement.