A burnt car in front of U.S. consulate, after an attack that killed four Americans, including Ambassador Chris Stevens on the night of Tuesday, in Benghazi, Libya, Thursday, Sept. 13, 2012. The American ambassador to Libya and three other Americans were killed when a mob of protesters and gunmen overwhelmed the U.S. Consulate in Benghazi, setting fire to it in outrage over a film that ridicules Islam's Prophet Muhammad. Ambassador Chris Stevens, 52, died as he and a group of embassy employees went to the consulate to try to evacuate staff as a crowd of hundreds attacked the consulate Tuesday evening, many of them firing machine-guns and rocket-propelled grenades. (AP Photo/Mohammad Hannon)

This year, the "October Surprise" that sometimes erupts late in presidential cycles came a month early.

Attacks on American diplomatic outposts in countries swept up in the Arab Spring are changing the dynamics of the contest between President Barack Obama and Republican challenger Mitt Romney. For now, at least, national security is center stage.

Romney supporters see a parallel with 1980, when the economy was struggling and President Jimmy Carter was burdened with a hostage crisis at the U.S. embassy in Tehran. Republican Ronald Reagan won handily.

Comparing Obama to the one-term Carter already had become a popular GOP attack theme even before this week's deadly assault on the U.S. mission in Libya and attacks on U.S. embassies in Egypt and Yemen.

Obama supporters look instead for parallels to 2004, when President George W. Bush — seeking a second term amid a slow recovery — successfully rallied a war-weary electorate by emphasizing his national-security credentials.

National defense is usually a GOP strength, but recent polls show Obama with an edge in this category over the former Massachusetts governor. Romney's response to the crisis, accusing Obama of apologizing for American values and appeasing Islamic extremists, has drawn criticism even from some prominent Republicans.

Romney's quick swing at Obama — as the crisis was unfolding in the Middle East and North Africa — was glaringly at odds with the more statesmanlike responses Wednesday from GOP leaders in Congress

On Thursday, Romney recalibrated his remarks and paid tribute to the four slain Americans in Libya, including U.S. Ambassador Christopher Stevens. "What a tragedy," he told a rally in Fairfax, Va.

But, in a pointed reference to the outbreak of violence at U.S. missions, Romney said, "sometimes it seems that we're at the mercy of events instead of shaping events."

"The world needs American leadership, the Middle East needs American leadership," Romney said.