The attack on the United States consulate in Benghazi, that killed Ambassador Christopher Stevens and three other embassy officials in September, may have been a dark day for America but it was a life raft for the floundering election campaign of the Republican presidential contender Mitt Romney.
Suddenly, President Barack Obama, whose foreign policy credentials, bolstered by the assassination of Osama bin Laden, seemed unassailable, looked vulnerable as his growing lead in the polls shrank.
Republicans went on the offensive, charging the Obama Administration with a massive security failure in Libya. When Joe Biden said, "We weren't told they wanted more security", contradicting a House Oversight Committee that found requests for extra protection were denied by the State Department, while a 16-man military team was withdrawn in August, Romney accused Biden of "doubling down on denial" and crept ahead in national polls.
By the time Secretary of State Hillary Clinton took responsibility for the Benghazi debacle this week, the security issue had become toxic. A New York Times report that weapons supplied to Syrian rebels were flooding to "hard-line Islamic jihadists" further eroded Obama's message that national security was safe with him.
But if Romney hoped Libya would be his October Surprise, a last-minute development that upsets an election, this week's debate may have dampened that expectation.
Obama appears to have bested Romney, whose claim the President waited 14 days before admitting Benghazi was a terrorist attack wilted when Obama showed he had identified an "act of terror" the next day.
Nonetheless, the Libyan affair has given Romney a chance to hammer Obama's leadership record on foreign policy, and lay out his own.
In a major foreign policy speech last week, Romney said the world wanted more American leadership. The 21st century "began with terror, war and economic calamity. It is our duty to steer it on to the path of freedom, peace and prosperity." The new century, he said, must be an American one.
Whereas Obama has recognised a more multilateral world since 2009, Romney's speech seemed a nostalgic throwback to a time before China and India began to challenge US global paramountcy. Long on Cold War bromides about America's commitment to democracy and short on specifics, Romney said US power had declined under Obama and the world wanted more US leadership.
"I think he's seeing the world the way folks who share his wealth see it," says Lemmon.
If leadership - and the claim Obama has failed to step on the gas in foreign policy - is key to Romney's narrative, he also has a bellicose streak. Take Iran. Obama's "red line" - the point where the US would take military action - is when Washington believes Tehran could build a nuclear weapon. Romney's flashpoint, like Israel's, is when Washington suspects Iran has nuclear capabilities. Romney has also castigated Russia, a US irritant in the Middle East, in Cold War language as America's "number one geopolitical foe".
Speaking to Haaretz, an Israeli newspaper, Romney foreign adviser Rich Williamson said, "When Mitt Romney is president Iran will understand that there is a new sheriff in town and that his position is that the only thing worse than the US using force would be for Iran to have nuclear weapons."
Such talk fuels speculation about Romney's foreign policy. "The foreign policy people who surround him do have a more adversarial view of the world," says Lemmon. "I don't think he will go looking for new conflicts. But will he be harsher in tone? I think that's very possible."
Writing in the Evening Standard, Sir Christopher Meyer, a former British ambassador to the US, said Romney's foreign policy advisers are "split between neo-con hawks and those of a more pragmatic, 'realist' world view".
Speaking to Foreign Policy in August, Tim Pawlenty, who is one of many tipped as a possible Secretary of State under Romney, implied Romney would be more hawkish than Obama, and "take a more robust approach" on relations with Russia and China and how to arm Syrian rebels "without putting American boots on the ground".
Romney may lean towards the neo-cons, but as a hard-headed businessman he is also pragmatic. He knows Americans are tired of war. Tough talk may be a bid to wrestle back ownership of national security, traditionally a Republican fiefdom, from Democrats who have spoken softly, using sanctions and diplomacy, but wielded a big stick with drone strikes, the 2009 Afghanistan troop surge and the lethal raid against Osama bin Laden's compound.
He has taken a tougher line with China, accusing Beijing of stealing copyrights and manipulating currency and promising to "make China play by the rules". Romney says he would expand naval power, building 15 warships a year. It is not clear how he would pay for such efforts to corral America's second largest creditor.
Like Obama, Romney favours more free trade to stimulate growth, build jobs and escape recession. Obama wants the Trans Pacific Partnership deal. Romney wants a free-trade deal with Latin America.
In a speech in September, he stressed that foreign aid cannot "pull the cart" and that "free enterprise" was the only way for developing nations to grow.
Next Tuesday, when both candidates debate foreign policy, the usual suspects, such as Iran, Syria, Libya and China, will likely feature. But it will be curious to see if momentous issues, including climate change, population growth and competition over resources - all Pentagon concerns - make the cut.
Defining a foreign policy to balance US national security with those challenges takes real leadership.By Peter Huck