The United States vowed to stand by Libya on Wednesday despite the killing of the US ambassador and three colleagues by Islamist militants on the anniversary of the September 11 attacks.
President Barack Obama and Secretary of State Hillary Clinton paid tribute to the slain envoy, Ambassador Chris Stevens, and said its mission would not waver in its support for Libya's shaky attempt to build democratic rule.
Obama's Republican challenger in the upcoming US presidential race, Mitt Romney, sounded the only off note -- accusing the White House of "sympathizing" with Muslim protesters angered by an amateur US movie that lampoons Islam.
The Obama campaign dismissed the charge, and the president himself rose above the fray to issue a solemn statement, flanked by Clinton in the Rose Garden of the White House, denouncing the attack.
"The United States condemns in the strongest terms this outrageous and shocking attack," he said. "Make no mistake, we will work with the Libyan government to bring to justice the killers who attacked our people."
"The attack will not break the bonds between the United States and Libya," he said, paying tribute to the actions of the new Libyan government which is trying to unite its country after last year's overthrow of Moamer Kadhafi.
"Libyan security personnel fought back alongside Americans. Libyans helped some of the diplomats find safety and carried Ambassador Stevens's body to the hospital where we tragically learned that he had died," Obama said.
Libya's deputy ambassador to the United Nations, Ibrahim Dabbashi, said that up to 10 members of the Libyan security forces were hurt or killed in their failed attempt to protect the compound belonging to their US ally.
Obama and Clinton said that security would be stepped up at various US missions around the world, and US officials said a detachment of Marines would be dispatched to secure the main embassy in the Libyan capital Tripoli.
An FBI spokesman said an investigation into the attack has been launched.
Tuesday's attack was on the US consulate in Benghazi, the eastern Libyan city which was the cradle of the NATO-backed revolt against Kadhafi's regime, and whose streets are now prey to a variety of tribal and Islamist militias.
The assault, in which the building was burned and rocket-propelled grenades were fired, followed an earlier protest in Cairo, the capital of neighboring Egypt, in which hardline Salafist Islamists stormed the US embassy compound.
No one was hurt in Cairo, but the US flag was torn down and replaced by the black banner favored by supporters of militant groups like Al-Qaeda, in a protest triggered by the emergence on the Internet of an anti-Muslim film.
The US-made amateur production, which was recently dubbed into Arabic and broadcast in part on some Egyptian-based television networks, mocks and insults Islam's revered prophet, Mohammed, and has triggered protests around the world.
Four hours before the Cairo protest began, the US embassy in Cairo issued a short statement indirectly criticizing the film by condemning "efforts by misguided individuals to hurt the religious feelings of Muslims."
For Romney, this amounted to Obama's administration "sympathizing with those who had breached our embassy in Egypt instead of condemning their actions."
But Clinton had insisted that anger over the film's content could in no way justify either the protest in Cairo nor the attack in Libya.
"Some have sought to justify this vicious behavior as a response to inflammatory material posted on the Internet," Clinton said.
"The United States deplores any intentional effort to denigrate the religious beliefs of others.... But let me be clear: There is never any justification for violent acts of this kind."