A US state department official was killed and at least one other American was wounded when militiamen 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.
Armed men 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.
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.
Social media calls
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 behaviour 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, the BBC's Rana Jawad in Tripoli says.
Our correspondent says many people are still armed following the conflict that overthrew Col Muammar Gaddafi last year.
The film that sparked the demonstration is said to have been produced by a 52-year-old 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.
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.
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 criticised 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 sympathise with those who waged the attacks," he said in a statement.