Candidates exchange tough words over attacks as campaign shifts from the economy.

Receive the latest politics updates in your inbox

US President Barack Obama makes a statement on the killing of US Ambassador to Libya Chris Stevens and three colleagues in Libya September 12, 2012 from the Rose Garden at the White House in Washington, DC. Obama strongly condemned Wednesday the killing of Stevens, in a mob attack at a US Consulate in Benghazi, fueled by anger over a film mocking Islam. AFP PHOTO / Mandel NGAN (Photo credit should read MANDEL NGAN/AFP/GettyImages)

Updated at 11:12 AM PDT on Thursday, Sep 13, 2012

Hours after Republican presidential nominee Mitt Romney said at a campaign rally the world needs better leadership from America, President Barack Obama pledged again that the perpetrators of Tuesday's attack at a U.S. consulate in Libya that left the American ambassador and three others dead would be avenged.

"I want people around the world to hear me: No act of terror will go unpunished," Obama said while campaigning in Colorado. "It will not dim the light of the values we proudly present to the rest of the world. No act of violence shakes the resolve of America."

Both presidential candidates toned down criticism of each other Thursday, instead honoring the Americans who died before transitioning into typical stump speeches.

Romney tied the unrest abroad to his pitch for a stronger military and better job opportunities at home.

Said Romney: "Your optimism is my optimism. America is coming back."

Romney blamed Obama for the potential of looming defense cuts under a budget deal the president sealed with Democrats and Republicans in Congress last year.

The GOP candidate said it seems the United States is sometimes at the "mercy of events instead of shaping events."

Romney focused his remarks on criticism of Obama's economic record, saying the president has led at a time of falling incomes, high unemployment and a widening gap between rich and poor. "His policies have not worked," Romney said.

The former businessman said he was better positioned to lead. "I didn't just study the economy in school, I've lived in the economy for 25 years," Romney said.

His new television ad accuses Obama of losing jobs while China is gaining. "It's time to stand up to the cheaters and make sure we protect jobs for the American people," Romney says in the commercial.

Romney had suggested that Obama was weak and didn't react quickly enough to condemn attacks on U.S. missions overseas that left an ambassador and three other Americans dead. He was criticized in some political and foreign policy circles for the tone, substance and motives of his response, but was backed up Thursday by Sen. John McCain, who said the president's "feckless foreign policy" has weakened America.

Voters give Obama an advantage on international affairs. An Associated Press-GfK poll taken before the party's nominating conventions found Obama, who ended the war in Iraq and led the killing of Osama bin Laden, with a big advantage as the stronger leader of the two candidates, 50 percent to 41 percent among registered voters. In an NBC/WSJ poll in August, 46 percent of registered voters said Obama would be a more "calm and steady leader in a crisis," while 34 percent said Romney would be better and 12 percent said both would be equally good.

Obama responded to Romney's attacks on the diplomatic crisis by suggesting the Republican is reckless and untested as a world leader. Obama accused him of having "a tendency to shoot first and aim later."

The campaign barbs came as protesters angered by an anti-Muslim film from a California filmmaker took to the streets and attacked U.S. missions in Libya, Egypt and Yemen. The Obama administration has dispatched two warships to the Libyan coast, ready to respond to any mission ordered by the president, who vowed Wednesday that "justice will be done."

Romney responded by criticizing Obama for having "a hit-or-miss approach" on foreign policy and tried to blame the president for an early statement from the embassy in Cairo that criticized the film as protests were forming. Romney incorrectly said the statement came after the embassy's grounds had been breached and added that the president is responsible for the words that come from his diplomats around the world.

"They clearly sent mixed messages to the world," Romney told reporters while campaigning in Florida on Wednesday. "The statement that came from the administration was a statement which is akin to an apology and I think was a severe miscalculation."

Obama responded to his rival in an interview with CBS News' "60 Minutes" later in the day. "It appears that Gov. Romney didn't have his facts right," 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."

Congressional Democrats spoke in sync with the president and accused Romney of mishandling international affairs and trying to politicize a tragedy. Republicans were less unified — some questioned Romney's handling of national security measures and top GOP leaders in Congress did not echo his criticisms of the president. Senate Republican leader Mitch McConnell of Kentucky said Obama "correctly tightened the security overseas." Asked about Romney's remarks, he declined to answer and walked toward his office in the Capitol.

Romney advisers concede that it was difficult to follow the chronology of the events in Libya late Tuesday — especially given their lack of official security briefings. Advisers said there was a sense in the campaign that Romney needed to be decisive and swift in his response to distinguish himself from the president's tone — which Romney calls apologist — on some foreign policy matters.

McCain agreed the embassy response was weak and accused Obama of compromising American influence around the world.

"I'd like to see the president of the United States speak up once for the 20,000 people that are being massacred in Syria," McCain told NBC's "Today" show.