to Libya and deployed a Marine team to bolster security at its Tripoli embassy after its ambassador was killed in Benghazi.
The decision to move the ships and a roughly 50-member Marine unit to Libya comes after Washington's envoy and three other Americans were killed in an attack on the US consulate in Benghazi on Tuesday.
The ambassador, Christopher Stevens, and the other Americans died after Islamist gunmen attacked the US consulate and a safe house refuge in Benghazi on Tuesday night.
The attackers were part of a mob blaming America for a film they said insulted the Prophet Mohammad.
File photo of US ambassador to Libya Chris Stevens who was killed in a rocket attack in Benghazi. (AFP photo)
The violence in the eastern city, a cradle of Libya's US-backed uprising against Muammar Gaddafi in 2011, came on the 11th anniversary of al-Qaeda's attacks on the United States on September 11, 2001.
Another assault was mounted on the US embassy in Cairo in which protesters, who included Islamists and teenage soccer fans, tore down and burned a US flag.
Stevens, 52, became the first US ambassador killed in such an attack since Adolph Dubs, the US envoy to Afghanistan, died in a kidnapping attempt in 1979. Envoy nurtured Libyan democracy
US government officials said the Benghazi attack may have been planned in advance and there were indications that members of a militant faction calling itself Ansar al Sharia - which translates as Supporters of Islamic Law - may have been involved.
They also said some reporting from the region suggested that members of al-Qaeda's north Africa-based affiliate, known as al Qaeda in the Islamic Maghreb, may have been involved.
"It bears the hallmarks of an organized attack," one US official said. However, some US officials cautioned against assuming that the attacks were deliberately organized to coincide with the September 11 anniversary.
Security personnel were separated from Stevens during the attack, US officials said, describing a chaotic scene of smoke, gunfire and confusion.
A US official said Washington had ordered the evacuation of all US personnel from Benghazi to Tripoli and was reducing staffing in the capital to emergency levels.
The US military is moving two Navy destroyers toward the Libyan coast, giving the Obama administration flexibility for any future action against Libyan targets, according to a US official.
The military also is dispatching a Marine Corps anti-terrorist security team to boost security in Libya.
The violence in Benghazi and Cairo threatened to spread to other Muslim countries.
Police fired teargas at angry demonstrators outside the US embassy in Tunisia and several hundred people gathered in front of the US embassy in Sudan.
In Morocco, a few dozen protesters burned American flags and chanted slogans near the US consulate in Casablanca.
Obama said the world must unite against such "brutal acts" as the assault in Libya.
"The United States condemns in the strongest terms this outrageous and shocking attack," he said, while insisting it would not threaten relations with Libya's new government. "... And make no mistake, we will work with the Libyan government to bring to justice the killers who attacked our people."
Libyan leader Mohammed Magarief apologized to the United States over an attack.
US SECURITY STEPPED UP WORLDWIDE
Obama said he had ordered an increase in security at US diplomatic posts around the globe.
The attacks could alter US attitudes towards the wave of revolutions across the Arab world that toppled secularist authoritarian leaders in Egypt, Libya and Tunisia and brought Islamists to power.
The violence also could have an impact on the closely contested US presidential race ahead of the November 6 election.
Republican Mitt Romney, Obama's challenger, criticized the president's response to the crisis.
He said the timing of a statement from the US embassy in Cairo denouncing "efforts by misguided individuals to hurt the religious feelings of Muslims" made Obama look weak as protesters were attacking US missions.
Romney said it was "disgraceful" to be seen to be apologizing for American values of free speech. Obama's campaign accused Romney of trying to score political points at a time of national tragedy.
Obama said Romney has a tendency "to shoot first and aim later."
Libyan deputy interior minister Wanis al-Sharif said Stevens and another diplomat died as a result of the consulate attack, while the other Americans died in what a Libyan military officer called an intense and highly accurate mortar attack on the safe house.
Ziad Abu Zaid, the duty doctor in the emergency room at Benghazi Medical Centre on Tuesday, said he had treated Stevens.
"He came in a state of cardiac arrest. I performed CPR for 45 minutes, but he died of asphyxiation due to smoke inhalation."
US officials said Stevens, information technology specialist Sean Smith and one security officer were trapped under fire in the burning consulate building.
The security officer made it outside and returned with help to search for the diplomats, officials said.
The searchers found Smith, who was already dead, but were unable to find Stevens amid repeated exchanges of gunfire between Libyan security forces and the attackers over the next several hours.
"At some point in all of this ... we believe that Ambassador Stevens got out of the building and was taken to a hospital in Benghazi. We do not have any information on what his condition was at that time," a senior US official said.
Stevens' body was later returned to US custody at Benghazi airport, the official said.
Images of Stevens, purportedly taken after he died, circulated on the Internet. One image showed him being carried, with a white shirt pulled up and a cut on his forehead.
Two more Americans died when a squad of US troops sent by helicopter from Tripoli to rescue the diplomats from the safe house came under mortar attack, said Captain Fathi al-Obeidi, commander of a Libyan special operations unit ordered to meet the Americans.
"It was supposed to be a secret place and we were surprised the armed groups knew about it," Sharif said of the safe house. Western countries denounced the Benghazi killings and Russia expressed deep concern, saying the episode underscored the need for global cooperation to fight "the evil of terrorism."
The attack raised questions about the future US diplomatic presence in Libya, relations between Washington and Tripoli, and the unstable security situation after Gaddafi's overthrow.
Witnesses said the mob at the consulate included tribesmen, militia and other gunmen.
Hamam, a 17-year-old who took part in the attack, said Ansar al-Sharia cars arrived at the start of the protest but left once fighting started.
"The protesters were running around the compound just looking for Americans, they just wanted to find an American so they could catch one," he said.
'WE STARTED SHOOTING AT THEM'
"We started shooting at them, and then some other people also threw hand-made bombs over the fences and started the fires in the buildings," he said.
"There was some Libyan security for the embassy outside but when the hand-made bombs went off they ran off and left."
Hamam said he saw an American die in front of him in the mayhem that ensued.
He said the body was covered in ash. Clips of the "Innocence of Muslims," the film that stirred the deadly attacks, had been circulating on the Internet for weeks before protests erupted.
For many Muslims, any depiction of the Prophet is blasphemous and caricatures or other characterisations have in the past provoked protests all over the Muslim world.
Many Muslim states focused their condemnation on the film and will be concerned about preventing a repeat of the fallout seen after publication in a Danish newspaper of cartoons of the Prophet Mohammad. This touched off riots in the Middle East, Africa and Asia in 2006 in which at least 50 people died.
Afghan President Hamid Karzai called the making of the movie a "devilish act" but said he was certain those involved in its production were a very small minority.
The US embassy in Kabul appealed to Afghan leaders for help in "maintaining calm" and Afghanistan shut down the YouTube site so Afghans would not be able to see the film.
General Martin Dempsey, the chairman of the US military's Joint Chiefs of Staff, took the unusual step of telephoning a radical Florida Christian pastor, Terry Jones, and asking him to withdraw his support for the film. Earlier provocative acts by Jones, like publicly burning a Koran, had sparked Muslim unrest.
In Egypt, Prime Minister Hisham Kandil called on Washington to act against the film's makers for stirring up strife but condemned the violence.
'SMALL AND SAVAGE GROUP'
US Secretary of State Hillary Clinton said the attack was the work of a "small and savage group."
US ambassadors in such volatile countries as Libya have tight security, usually travelling in well-protected convoys. Diplomatic missions are normally protected by Marines or other special forces.
Abdel-Monem Al-Hurr, spokesman for Libya's Supreme Security Committee, said Libyan security forces came under heavy fire and "were not prepared for the intensity of the attack."
Security experts say the area around Benghazi is host to a number of Islamist militant groups who oppose any Western presence in Muslim countries.
(With Reuters, AFP inputs)