TRIPOLI, Libya: A mob enraged by a film ridiculing Islam's prophet killed the U.S. ambassador to Libya and three other Americans in a fiery attack on the U.S. Consulate in Benghazi.
President Barack Obama strongly condemned the violence, vowed Wednesday to bring the killers to justice and tightened security at diplomatic posts around the world.
The attack that killed Ambassador Chris Stevens - the first U.S. diplomat to die in the line of duty since 1979 - came on Tuesday's 11th anniversary of the Sept. 11 terrorist strike and presented a new foreign policy crisis for the United States in a region trying to recover from months of upheaval.
Libya's interim president, Mohammed el-Megarif, apologized for what he called the "cowardly" assault on the consulate, which also killed several Libyan security guards in the eastern city. Violence also flared in Egypt, where crowds protesting the film at the U.S. Embassy in Cairo climbed its walls and tore down an American flag, which they replaced briefly with a black, Islamist flag.
The protests were touched off by an obscure movie made in the United States by a filmmaker who calls Islam a "cancer." Video excerpts posted on YouTube depict the Prophet Muhammad as a fraud, a womanizer and a madman in an overtly ridiculing way, showing him having sex and calling for massacres.
Stevens, 52, died as he and a group of embassy employees went to the consulate to try to evacuate staff when the mob of protesters, including gunmen armed with machine guns and rocket-propelled grenade, attacked.
The crowd, which numbered several thousand strong, moved on the consulate Tuesday evening, firing in the air outside the compound. The consulate is a one-story villa located in a fenced garden in downtown Benghazi. A small contingent of Libyan security forces protecting the facility also fired in the air, trying to intimidate them, said Wanis el-Sharef, the deputy interior minister of Libya's eastern region.
But faced with the mob's superior size and firepower, the Libyan security withdrew, el-Sharef said. Gunmen stormed the building, looted its contents and torch it, he said.
By the end of the assault, much of the building was burned out and trashed.
Details of how the Americans were killed were still being pieced together Wednesday. But according to al-Sharef's account, two distinct attacks took place.
Al-Sharef said Stevens and a consultate staffer who had stayed behind in the building were killed in the initial attack on the consulate.
The rest of the staff successfully evacuated to another building nearby, preparing to move to Benghazi Airport after daybreak to fly to the capital, Tripoli, he said.
Hours after the storming of the consulate, a separate group of gunmen attacked the other building, opening fire on the more than 30 Americans and Libyans inside. Two more Americans were killed and 32 wounded - 14 Americans and 18 Libyans, he said.
Stevens, he added, was visiting Benghazi to inaugurate an American culture center in the city. His body was identified by his Egyptian interpreter. There was no immediate confirmation of al-Sharef's account.
Dr. Ziad Abu Zeid, who treated Stevens, told The Associated Press that he died of asphyxiation, apparently from smoke. In a sign of the chaos during the attack, Stevens was brought by Libyans to the Benghazi Medical Center with no other Americans, and no one at the facility knew who he was, Abu Zeid said.
Stevens was practically dead when he arrived before 1 a.m. Wednesday, and "we tried to revive him for an hour and a half, but with no success," Abu Zeid said.
The ambassador was bleeding in his stomach because of the asphyxiation but had no other injuries, he said.
The State Department identified one of the other Americans killed as Sean Smith, a foreign service information management officer. The identities of the others were being withheld pending notification of next of kin.
"I strongly condemn the outrageous attack on our diplomatic facility in Benghazi," Obama said in Washington, adding the four Americans "exemplified America's commitment to freedom, justice, and partnership with nations and people around the globe."
Obama ordered increased security to protect American diplomatic personnel around world.
"Make no mistake we will work with the Libyan government to bring to justice the killers who attacked our people," he said.
Obama added: "We reject all efforts to denigrate the religious beliefs of others, but there is absolutely no justification for this type of senseless violence, none."
El-Megarif offered his condolences to the U.S. and also vowed to bring the culprits to justice and maintain his country's close relations with Washington.
"We extend our apology to America, the American people and the whole world," el-Megarif said.
The brazen assaults - the first on U.S. diplomatic facilities in Libya and Egypt - were signs of the lawlessness that has taken hold in Libya and Egypt after revolutions ousted their autocratic secular regimes and upended the tightly controlled police state in both countries.
Islamists, who were long repressed under the previous regimes, have emerged as a powerful force and made up the bulk of the protesters in both countries.
Moreover, security in both countries has broken down. Egypt's police, a once hated force blamed for massive human rights abuses, have yet to fully take back the streets after Hosni Mubarak's ouster in February 2011.
On Tuesday in Cairo, riot police stood by the embassy's walls but continued to allow protesters to climb them for several hours. The protesters, however, appeared to intentionally stick to certain limits: A few entered the embassy grounds to remove the flags and come back, but otherwise the chanting youth stayed on top of the walls without storming the compound or damaging property.
The uproar over the film also poses a new test for Egypt's Islamist president, Mohammed Morsi, who has yet to condemn the riot outside the U.S. Embassy in Cairo or say anything about the offending film.
In Libya, central government control is weak, arms are ubiquitous and militias are pervasive. The consulate in Benghazi, Libya's second largest city, is a one-story villa in a large garden located in an upscale neighborhood. By the end of Tuesday night's attack, much of the building was black and smoldering. Libyans wandered freely around the burned-out building, taking photos of rooms where furniture was covered in soot and overturned.
The violence raised worries that further protests could break out around the Muslim world as knowledge of the anti-Islam movie spread.
About 50 protesters burned American flags outside the U.S. Embassy in Tunisia's capital Wednesday but were kept away from the building by reinforced security.
And in Gaza City, dozens of protesters carrying swords, axes and black flags chanted "Shame on everyone who insults the prophet." The rally was organized by supporters of a militant group aligned with the ruling Hamas movement.
Afghanistan's government sought to avert an outbreak of protests. President Hamid Karzai condemned the movie, which he describes as "inhuman and insulting."
Authorities also temporarily shut down access to YouTube, the video-sharing site where excerpts of the movie were posted, said Aimal Marjan, general director of Information Technology at the Ministry of Communications.
Ultraconservative Islamists also were suspected of being behind the Benghazi attack. Advocating a strict interpretation of Islam, they have bulldozed Sufi shrines and mosques that house tombs in the Libyan capital, Tripoli, and other cities, including ancient sites dating back to 5,000 years ago.
Heavily armed, ultraconservative groups like Ansar al-Shariah, or Supporters of Shariah, have claimed responsibility for the attacks on the shrines, declaring Sufi practices as "heretical."
Libya has been also hit by a series of recent attacks that served as evidence of the deep and persistent security vacuum in the country after the fall of Moammar Gadhafi's regime, which was ousted by rebels backed by a NATO air campaign. Many Libyans believe that unrest in their country is in part the work of Gadhafi's loyalists who want to undermine efforts to rebuild the country after last year's ruinous civil war.
Stevens was a career diplomat who spoke Arabic and French and had already served two tours in Libya, including running the office in Benghazi during the revolt against Gadhafi. He was confirmed as ambassador to Libya by the Senate earlier this year.
Before Tuesday, five U.S. ambassadors had been killed in the line of duty, the last being Adolph Dubs in Afghanistan in 1979, according to the State Department.
The two-hour movie that sparked the protests, titled "Innocence of Muslims," came to attention in Egypt after its trailer was dubbed into Arabic and posted on YouTube.
A man identifying himself as Sam Bacile, a 56-year-old California real estate developer, said he wrote, produced and directed the movie.
He told the AP he was an Israeli Jew and an American citizen. But Israeli officials said they had not heard of Bacile and there was no record of him being a citizen.
They spoke on condition of anonymity because they are not permitted to share personal information with the media.
Separately, the film was being promoted by an extreme anti-Muslim Egyptian Christian campaigner in the United States.