Washington's envoy to Libya and three other Americans were killed when a mob outraged over a movie mocking Islam stormed the US consulate in Benghazi, Libyan and US officials said on Wednesday.
President Barack Obama quickly ordered increased security at US diplomatic posts around the world, while slamming Tuesday's deadly assault in Benghazi, an Islamist stronghold in eastern Libya.
"I strongly condemn the outrageous attack on our diplomatic facility in Benghazi, which took the lives of four Americans, including Ambassador Chris Stevens," Obama said, in a White House statement.
"I have directed my Administration to provide all necessary resources to support the security of our personnel in Libya, and to increase security at our diplomatic posts around the globe," he added.
Stevens, a career officer with the US foreign service, had been in the country for less than four months after taking up his post in the capital Tripoli in May.
Witnesses said he was killed when angry Islamists late on Tuesday attacked the consulate with rocket-propelled grenades before looting it and torching the building.
A security source in Benghazi - cradle of the 2011 uprising that toppled the regime of late dictator Muammar Gaddafi - said it was suspected that the envoy may have suffocated due to carbon monoxide poisoning.
A picture taken by an AFP photographer shows an injured Stevens being aided by Libyans inside the premises of the consulate.
The Benghazi attack came just hours after Islamists had stormed the US embassy in Cairo in a similar protest against the amateur American-made internet video.
Clips of the film at the centre of the controversy have been posted on the internet and private satellite channels have been showing segments.
The low-budget movie, "Innocence of Muslims" in which actors have strong American accents, portrays Muslims as immoral and gratuitously violent.
It pokes fun at the Prophet Mohammed and touches on themes of paedophilia and homosexuality, while showing him sleeping with women, talking about killing children and referring to a donkey as "the first Muslim animal".
The film was produced by Israeli-American Sam Bacile, according to the Wall Street Journal, but Egyptian media say that some Egyptian Copts living in the US were involved in the production.
The film is being promoted by controversial Florida pastor Terry Jones, who has drawn protests in the past for burning the Koran and vehemently opposing the construction of a mosque near Ground Zero in New York.
Abdelmonoem al-Horr, spokesperson for the Libyan interior ministry's security commission, had on Tuesday said rocket-propelled grenades were fired at the consulate from a nearby farm.
Witnesses said the attackers ripped up a US flag, then looted the consulate before setting it on fire on the eleventh anniversary of the 11 September attacks.
"Dozens of demonstrators attacked the consulate and set fire to it," said a Benghazi resident, who only gave his name as Omar, adding that he had seen the flames and heard shots in the vicinity.
Another Libyan witness said armed men, including ultra-conservative Salafists, had closed the streets leading up to the consulate.
The violent protest was strongly condemned by Libya's General National Congress, which in a statement expressed "outrage at the unfortunate attack against the American consulate in Benghazi".
The Libyan incident came after thousands of Egyptian demonstrators on Tuesday tore down the Stars and Stripes at the US embassy in Cairo and replaced it with a black Islamic flag, similar to one adopted by several militant groups.
Nearly 3000 demonstrators, most of them hardline Islamist supporters of the Salafist movement, gathered at the embassy in protest over the film, which was produced in the United States.
A dozen men scaled the embassy walls and one of them tore down the US flag, replacing it with a black one inscribed with the Muslim profession of faith: "There is no God but God and Mohammed is the prophet of God."
Egyptian police intervened without resort to force and persuaded the trespassers to come down. The crowd then largely dispersed leaving just a few hundred protesters outside the US mission, an AFP correspondent reported.
An Egyptian security official said on Wednesday that security has been stepped up in the area around the US embassy in Cairo following the protests.
Coptic activists said they would stage a vigil on Wednesday in protest against the film.
Benghazi, a stronghold of Islamist extremists and cradle of the revolution that saw strongman Muammar Gaddafi captured and killed last year, has seen a wave of violence in recent months, including attacks on Western targets, bombings of military buildings and the killings of army and security officers.
Interior Minister Fawzi Abdelali has warned that Islamists amount to a "major force" in Libya both in terms of numbers and arms.