By Mohammed Ghobari and Edmund Blair
SANAA/CAIRO (Reuters) - Demonstrators attacked the U.S. embassies in Yemen and Egypt on Thursday in protest at a film they consider blasphemous to Islam, and American warships headed to Libya after the U.S. ambassador there died in related violence earlier this week.
Hundreds of Yemenis broke through the main gate of the heavily fortified compound in the capital Sanaa, shouting "We sacrifice ourselves for you, Messenger of God". They smashed windows of security offices outside the embassy and burned cars.
"We can see a fire inside the compound and security forces are firing in the air. The demonstrators are fleeing and then charging back," one witness told Reuters. A security source said at least 15 people were wounded, some by gunfire, before the Yemeni government ringed the area with troops. An embassy spokesman said its personnel were safe.
In Egypt, protesters hurled stones at a police cordon around the U.S. embassy in central Cairo after climbing into the embassy compound and tearing down the American flag. The state news agency said 13 people were hurt in violence which erupted late on Wednesday, following initial protests on Tuesday.
During a similar protest on Tuesday at the U.S. consulate in Benghazi, Libyan Islamists staged military-style assaults on the mission and a safe house refuge. It was the 11th anniversary of al Qaeda's attacks on the United States on September 11, 2001.
The U.S. ambassador Christopher Stevens and three other Americans died in the assaults, carried out with guns, mortars and grenades. Eight Libyans were injured.
President Barack Obama vowed to "bring to justice" those responsible for the attack, which U.S. officials said may have been planned in advance. Secretary of State Hillary Clinton said Washington had nothing to do with the video, which she called "disgusting and reprehensible".
The U.S. military moved two destroyers towards the Libyan coast, in what an official said was a move to give the administration flexibility for any future action against Libyan targets.
The U.S. military also dispatched a Marine Corps anti-terrorist team to boost security in Libya, whose leader Muammar Gaddafi was ousted in a U.S.-backed uprising last year.
Obama said security was being increased at U.S. diplomatic stations around the globe. Nigeria put police on high alert and stepped up security around all foreign missions, fearing an Islamist backlash, possibly after weekly prayers on Friday.
On Thursday, the U.S. consulate in Berlin was partially evacuated after an employee fell ill on opening a suspicious envelope. Bangladeshi Islamists tried to march on the U.S. embassy in Dhaka and Iranian students protested in Tehran.
Earlier in the week, there were protests outside U.S. missions in Tunisia, Sudan and Morocco.
The attackers were part of a mob blaming America for a film they said insulted the Prophet Mohammad. Clips of the "Innocence of Muslims," had been circulating on the Internet for weeks before the protests erupted.
They show an amateurish production portraying Mohammad as a womanizer, a homosexual and a child abuser. For many Muslims, any depiction of the Prophet is blasphemous and caricatures or other characterizations have in the past provoked protests.
Clinton said Washington rejected the film's message absolutely. "It appears to have a deeply cynical purpose: to denigrate a great religion and provoke rage," she said.
An actress in the California production said the video as it appeared bore no resemblance to the original filming. She had not been aware it was about the Prophet Mohammad.
Among the assailants in Benghazi, Libyans identified units of a heavily armed local Islamist group, Ansar al-Sharia, which sympathizes with al Qaeda and derides Libya's U.S.-backed bid for democracy.
Former Libya militant commander Noman Benotman, now president of Britain's Quilliam think-tank, said Western officials were investigating a possible link with a paramilitary training camp about 100 miles south of the eastern Libyan town of Derna, near the Egyptian border.
U.S. officials said there were suggestions members of al Qaeda's north-Africa based affiliate may have been involved.
Yemen, a key U.S. ally, is home to Al Qaeda in the Arabian Peninsula (AQAP), viewed by Washington as the most dangerous branch of the militant network established by Osama bin Laden.
The attacks could alter U.S. attitudes towards the revolutions 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 U.S. presidential race ahead of the November 6 election.
Republican Mitt Romney, Obama's challenger, criticized the government's response to the crisis, saying 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.
The attack raised questions about the future U.S. diplomatic presence in Libya, relations between Washington and Tripoli, and the unstable security situation after Gaddafi's overthrow.
Some see such aggressive religiosity as a tactic by hardline Islamist groups keen to mark out their differences from more mainstream Muslim leaders who have risen to positions of power.
Stevens, 52, had spent a career operating in perilous places, mostly in the Arab world and became the first American ambassador killed in an attack since Adolph Dubs, the U.S. envoy to Afghanistan, died in a 1979 kidnapping attempt.
A Libyan doctor at a Benghazi hospital pronounced him dead of smoke inhalation and U.S. information technology specialist Sean Smith also died. Two other Americans were killed when a squad of U.S. troops sent by helicopter from Tripoli to rescue diplomats from the safe house came under mortar attack.
Libyan leader Mohammed Magarief and Yemeni President Mansour Hadi both apologized to the United States over the attacks and Egypt's Islamist President Mohamed Mursi condemned them on television while also rejecting any "insult to the Prophet".
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 U.S. embassy in Kabul appealed to Afghan leaders for help in "maintaining calm" and Afghanistan ordered the YouTube site shut down so Afghans would not be able to see the film. YouTube, owned by Google Inc, said it would not remove the clip but blocked access in Egypt and Libya.
Russian President Vladimir Putin, a sharp critic of last year's Western military intervention in Libya and of Western backing for Syria's rebels, condemned the violence and called on new Arab governments to take responsibility for containing it.
(Additional reporting by Samia Nakhoul in Beirut, Marie-Louise Gumuchian and Hadeel Al Shalchi in Tripoli, Sami Aboudi in Dubai, Raissa Kasolowsky in Abu Dhabi, Sarah N. Lynch, Arshad Mohammed, Andrew Quinn, Matt Spetalnick, Steve Holland and Mark Hosenball in Washington, William Maclean in London and Reuters reporters in Cairo and Benghazi; Writing by Philippa Fletcher; Editing by Janet McBride and Alastair Macdonald)