WASHINGTON -- Flaring mob violence at U.S. embassies in the Arab world was consuming the U.S. presidential race Thursday, enforcing a dramatic shift away from what had been a fierce battle between President Barack Obama and Republican challenger Mitt Romney over fixing the struggling American economy.

Romney was coming under a barrage of criticism not only from Democrats but from Republican voices over the former Massachusetts governor's ill-timed remarks about the administration's handling of the Middle East violence.

But he won backing for the last Republican presidential nominee, Sen. John McCain, who said Obama was conducting a "feckless foreign policy."

Late Tuesday, Romney launched a series of accusations that the Obama administration of was showing weakness in responding to the attacks, the worst of which killed the U.S. ambassador to Libya, Chris Stevens, and three American members of his staff. Romney's statement was released well before the full extent of the attacks was known.

The assaults on U.S. diplomatic missions began in Cairo. Romney blasted an initial statement from the U.S. Embassy there as disgraceful and "akin to apology," adding later, "It's never too early for the United States government to condemn attacks on Americans and to defend our values."

However, the embassy statement came before the protesters had breached the embassy's walls and was an affirmation of the American policy of religious tolerance and respect, and was not cleared by the White House. A statement by Secretary of State Hillary Rodham Clinton minutes before Romney's was released condemned the attack in Libya and said there was no justification for such violent acts.

Obama made a sombre statement Wednesday morning condemning the attacks and announcing plans to deploy additional Marines at diplomatic posts overseas. An additional U.S. warship was dispatched to the Libyan coast. In an interview with CBS News' "60 Minutes" later in the day, Obama said the episode showed Romney's penchant for having "a tendency to shoot first and aim later."

"It appears that Gov. Romney didn't have his facts right," Obama said.

On Wednesday night, during a rally in Las Vegas, the president said he had a message for the rest of the world: "No act of terror will dim the light of the values that we proudly shine on the rest of the world, and no act of violence will shake the resolve of the United States of America." "And make no mistake. Justice will be done" he declared.

The four diplomats were killed on Tuesday as protesters overran and burned the U.S. Consulate in Benghazi, Libya. That happened after the U.S. Embassy in Cairo was breached by protesters, and the American flag was ripped down, although no deaths were reported.

Thursday the violence spread as hundreds of protesters stormed the U.S. Embassy compound in Yemen's capital, Sanaa. They tore down and burned the U.S. flag, replacing it with a black banner bearing Islam's declaration of faith -- "There is no God but Allah."

American officials were investigating whether the attack in Libya was a terrorist strike timed to mark the 11th anniversary of the attacks of Sept. 11, 2001. Initial reports were that both the Libya and Egypt events had been motivated by anger over an anti-Muslim film made in the United States.

The Obama and Romney exchange occurred with less than eight weeks remaining in a tight presidential race, a campaign that has remained close for months and is being fiercely waged in fewer than 10 battleground states that don't consistently vote Democratic or Republican.

Economic concerns could play a more prominent role on Thursday, when Romney appears at a rally in the Virginia suburbs outside Washington, and Obama holds an event in Colorado's Denver suburbs. Obama carried both states in 2008, but they remain up for grabs and heavily contested by both campaigns.

The Federal Reserve was expected to announce Thursday whether it plans to take new steps to spur the U.S. economy. There were expectations the central bank would announce a third round of bond purchases aimed at easing long-term interest rates and spurring borrowing and spending.

The economy has been the top issue throughout the race, with recent surveys showing Romney with a narrow advantage over the president when it comes to plans for reducing the nation's unemployment rate of 8.1 per cent. On foreign policy, Obama has held a clear edge on which candidate is better suited to handle international affairs.

Romney has defended his decision to issue his criticism before it was known that Stevens had been killed. Asked if he would have done so had he known about the deaths, he said, "I'm not going to take hypotheticals about what would have been known and so forth."

Some Republicans with experience in national security matters questioned Romney's handling of the events and top Republican leaders in Congress did not echo Romney's remarks. Senate Republican leader Mitch McConnell said Obama "correctly tightened the security overseas." Asked about Romney's remarks, he declined to answer and walked toward his office in the Capitol.

Obama said in the "60 Minutes" interview that the embassy was trying to "cool the situation down" and it was released "from folks on the ground who are potentially in danger."

"My tendency is to cut folks a little bit of slack when they're in that circumstance, rather than try to question their judgment from the comfort of a campaign office," Obama said.

He added that as president, "it's important for you to make sure that the statements you make are backed up by the facts, and that you've thought through the ramifications before you make them."