President Barack Obama has confirmed that US ambassador to Libya, Christopher Stevens, is among four Americans killed in an attack on the US consulate in the eastern Libyan city of Benghazi.
Unidentified armed men stormed the grounds on Tuesday night in a protest over a US-produced film that is said to insult the Prophet Muhammad.
They shot at buildings and threw handmade bombs into the compound.
Protesters also attacked the US embassy in Cairo over the film.
In a statement, Barack 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.
President Barack 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 Sean 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.
Hillary Clinton said of Christopher 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.
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 is 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.
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.