Updated at 9:27 a.m. Eastern

(CBS/AP) U.S. Ambassador to Libya J. Christopher Stevens was among four Americans killed in an attack by Muslim protesters on the U.S. consulate compound in Benghazi the previous evening, the U.S. government confirmed Wednesday.

"I strongly condemn the outrageous attack on our diplomatic facility in Benghazi, which took the lives of four Americans, including Ambassador Chris Stevens," President Obama said in a written statement released Wednesday morning. The U.S. government had confirmed one American death on Tuesday.

Get Breaking News Delivered to Your Inbox

President Obama said he had ordered heightened security at all U.S. diplomatic offices around the world in the wake of the attack in Benghazi and a similar but less violent incident in Cairo on Tuesday. Both incidents were sparked by hardline Muslims protesting a film made in the U.S. which insults the Muslim prophet Muhammad.

Military officials told CBS News an anti-terrorism team of U.S. Marines was being deployed to Libya to help secure U.S. interests in the country following the attack. The State Department said, however, that no Americans were remaining at the facility in Benghazi. State officials would not confirm how many Americans were evacuated, or to where.

Wanis al-Sharef, a Libyan Interior Ministry official in Benghazi, said the four Americans were killed when the angry mob, which gathered to protest a U.S.-made film that ridicules Islam's Prophet Muhammad, fired guns and burned down the U.S. consulate in Benghazi.

He said Stevens, 52, and other officials were moved to a second building - deemed safer - after the initial wave of protests at the consulate compound. According to al-Sharef, members of the Libyan security team seem to have indicated to the protesters the building to which the American officials had been relocated, and that building then came under attack.

Stevens, 52, was the first U.S. ambassador to be killed in the line of duty since 1979. A Libyan doctor who says he treated Stevens told the Associated Press Wednesday that the diplomat died of severe asphyxiation and that he tried for 90 minutes to revive him.

Ziad Abu Zeid said Stevens was brought to the Benghazi Medical Center by Libyans Tuesday night with no other Americans, and that initially no one realized he was the ambassador. Abu Zeid said Stevens had "severe asphyxia," apparently from smoke inhalation, causing stomach bleeding, but had no other injuries.

Mobs hit U.S. buildings in Libya, Egypt

Obama, Romney camps clash over response to Libya, Egypt

AP: Anti-Muslim filmmaker in hiding after attacks

Al-Sharef said two U.S. Marines sent to Benghazi when the clash erupted were shot and killed by the well-armed protesters. It was not immediately clear whether the Marines were part of Stevens' security detail. The American whose death was confirmed on Tuesday also died of a gunshot wound. He was identified by the State Department on Wednesday as Foreign Service Information Management Officer Sean Smith.

Deputy Libyan Prime Minister Mustafa Abushagur said on his Twitter account that, "Amb. Stevens was a friend of Libya and we are shocked at the attacks on the U.S. consulate." The Libyan Prime Minister also expressed grief and condemned the attack.

According to his biography page on the U.S. Embassy's website, Stevens "was the American representative to the Transitional National Council in Benghazi during the revolution," in Libya. Benghazi was the capital of rebel-held Libya during the uprising to oust Qaddafi.

An armed man waves his rifle as buildings and cars are engulfed in flames after being set on fire inside the U.S. consulate compound in Benghazi, Libya, Sept. 11, 2012. Getty

According to al-Sharef, the angry mob stormed the consulate after the U.S. troops who responded fired rounds into the air to try and disperse the crowd. Al-Sharef said there had been threats that Islamic militants might try to take revenge for the death of al Qaeda's No. 2 commander Abu Yahya al-Libi, who was killed in a U.S. drone strike in Pakistan in June, and he said the U.S. consulate should have been better protected.

Confirming al-Libi's death for the first time in a video posted online Monday, al Qaeda chief Ayman Al-Zawahri called on Muslim's in al-Libi's native Libya to take revenge for his death.

Al-Sharef said the Libyan guards employed to guard the consulate building were far outgunned by the protesters, and thus retreated when the building was stormed.

Hours before the protest erupted in Benghazi, protesters scaled the walls of the U.S. Embassy in Cairo, Egypt, tearing down and replacing the American flag with an Islamic banner.

CBS News' Alex Ortiz reported from Cairo that about 40 or 50 protesters had again gathered in front of the U.S. Embassy on Wednesday, but they were far outnumbered by Egyptian security personnel.

Tuesday's attacks were the first such assaults on U.S. diplomatic facilities in either country, at a time when both Libya and Egypt are struggling to overcome the turmoil following the ouster of their longtime leaders, Muammar Qaddafi and Hosni Mubarak, in uprisings last year.

There have been indications in recent months that radical, armed Islamic groups have gained a foothold in Libya since the fall of the Qaddafi regime.

One of the groups to emerge in post-revolution Libya, Ansar al-Sharia, claimed responsibility Wednesday for the attack in Benghazi, which has been condemned by the country's new government.

The protests in both countries were sparked by outrage over the film ridiculing Muhammad, which was produced by an American-Israeli in California and being promoted by an extreme anti-Muslim Egyptian Christian campaigner in the United States. Excerpts from the film, dubbed into Arabic, were posted on Youtube during the summer.

"While the United States rejects efforts to denigrate the religious beliefs of others, we must all unequivocally oppose the kind of senseless violence that took the lives of these public servants," Mr. Obama said in the statement Wednesday morning, calling Stevens "a courageous and exemplary representative of the United States."

U.S. Secretary of State Hillary Clinton strongly condemned the attack on Tuesday and said she had called Libyan President Mohammed el-Megarif, "to coordinate additional support to protect Americans in Libya."

Clinton expressed concern that the protests might spread to other countries. She said the U.S. is working with "partner countries around the world to protect our personnel, our missions, and American citizens worldwide."

"Some have sought to justify this vicious behavior as a response to inflammatory material posted on the Internet," Clinton said in the statement released by the State Department. "The United States deplores any intentional effort to denigrate the religious beliefs of others. Our commitment to religious tolerance goes back to the very beginning of our nation. But let me be clear: There is never any justification for violent acts of this kind."

Sam Bacile, an American citizen who said he produced, directed and wrote the two-hour film, has gone into hiding, The Associated Press reports.

He told the AP from an undisclosed location that he had not anticipated such a furious reaction.

"I feel sorry for the embassy. I am mad," Bacile said.

The incidents also led to an exchange between the campaigns of Republican standard bearer Mitt Romney and President Obama, over the nature of a statement released by the U.S. Embassy in Cairo following the attack there.