The US ambassador to Libya is among four Americans killed in an attack on the US consulate in Benghazi, President Barack Obama has confirmed.
Unidentified armed men stormed the grounds overnight amid uproar among Muslims over a US-produced film said to insult the Prophet Muhammad.
They shot at buildings and threw handmade bombs into the compound.
It is still unclear how the ambassador, J Christopher Stevens, and the others actually died.
Protesters against the film also attacked the US embassy in Cairo on Tuesday night.
In a statement, President Obama condemned the “outrageous attack” on the facility in Benghazi.
“Chris was a courageous and exemplary representative of the United States. Throughout the Libyan revolution, he selflessly served our country and the Libyan people at our mission in Benghazi,” he said.
Mr Obama also ordered a tightening of security at US diplomatic posts around the globe.
A second US man killed in the attack was named as Sean Smith, a father of two who was employed as an information management officer.
US Secretary of State Hillary Clinton described Mr Smith as “one of the best”.
The names of the remaining two victims have not yet been released.
It is not yet clear how the four died.
Mrs Clinton said of Mr Stevens: “Chris was committed to advancing America’s values and interests, even when that meant putting himself in danger.”
The killings were also condemned by the Libyan Deputy Prime Minister Mustafa Abu Shagur.
“I condemn these barbaric acts in the strongest possible terms. This is an attack on America, Libya and free people everywhere,” he said on the social networking site Twitter.
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.
Analysts say the attack will raise serious new concerns about stability in the country and the ability of the new Libyan administration to maintain security.
Other countries will be wondering whether their consular staff are safe in Libya, they say.
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, which correspondents say is highly provocative and insulting to Muslims, has appeared on YouTube translated into Arabic.
The BBC’s Richard Galpin says there are real fears that protests over the video could spread.
A demonstration in Cairo on Tuesday saw protesters breach the US embassy and tear down the US flag, which was flying at half mast to mark the 9/11 attacks.
They condemned what they said was the humiliation of the Prophet of Islam under the pretext of freedom of speech.