The president fiddles as the world burns.

Four years ago John McCain was campaigning on his foreign-policy experience when along came a financial crisis that killed his chances. This time around Mitt Romney has been campaigning on his economic experience. Now along comes a foreign-policy crisis. Will it kill his chances, too? Or can the Republicans finally land a punch on President Obama?

They really should be able to. Because what is unfolding in the Middle East has the makings of the most perfect storm in American foreign policy since 1979. You may recall what happened then. Another Islamist revolution. Another attack on a U.S. Embassy. Another Democrat in the White House.

This is what Jimmy Carter said in a speech on Feb. 7, 1980, as the Iranian hostage crisis entered its third month: “I have been struck ... by the human and moral values which Americans as a people share with Islam. We share, first and foremost, a deep faith in the one Supreme Being. We are all commanded by him to faith, compassion, and justice. We have a common respect and reverence for law ... On the basis of both values and interests, the natural relationship between Islam and the United States is one of friendship ... We have the deepest respect and reverence for Islam.”

Remind you of anything? Try this: “I’ve come here ... to seek a new beginning between the United States and Muslims around the world, one based on mutual interest and mutual respect, and one based upon the truth that America and Islam are not exclusive and need not be in competition. Instead, they overlap, and share common principles—principles of justice and progress, tolerance, and the dignity of all human beings ... Let there be no doubt: Islam is a part of America.”

That was from a speech given by President Obama in Cairo on June 4, 2009. Funny how small a difference 30 years make. Same old pious hopes for respect, reverence for law, and tolerance. And, in return, the same disrespect, illegality, and intolerance. The embassy in Tehran then, the consulate in Benghazi now.

Here’s what happens to American presidents who look to be loved in the Middle East. In 2008, the year Obama won the presidency with his pledge to end George W. Bush’s wars, 75 percent of Egyptians had an unfavorable opinion of the United States. Today it’s 79 percent. Four years ago, that was the percentage of Jordanians with a negative view of the U.S. Now it’s 86 percent.

“It is much safer to be feared than loved,” Machiavelli teaches us. Today America is neither. Consider the wider ramifications of the Middle Eastern crisis. Revolutions have succeeded, with halfhearted American support, in Egypt, Libya, and Tunisia. Among the beneficiaries have been staunch anti-American organizations like the Muslim Brotherhood. The United States continues to give Egypt more than $1 billion a year in aid, roughly the price of the two attack submarines the Egyptians are buying from Germany. The country was once America’s ally. Last week the president conceded it is now neither our enemy nor our friend.

America’s most dependable ally in the region is Israel. Repeatedly this year Israeli Prime Minister Benjamin Netanyahu has pleaded with Obama to draw a “red line” on Iran’s nuclear program rather than give a “red light” to preventive military action. Last week the White House declined even to meet with Netanyahu when he visits the United States later this month. Even Haaretz (no fan of Bibi) regards this as a mistake.

Maybe you think George Bush’s invasion of Iraq was a worse mistake, though it gave that country democracy, showed Arabs that dictators can be toppled, and turned an enemy into a potential ally. But consider the consequences of this president’s decision to pull out of Iraq. Two months ago, at least 100 Iraqis perished in a wave of bombings and shootings by al Qaeda in Iraq, which aims to overthrow the Shia-led government of Nuri al-Maliki. Last week the country’s Sunni vice president was sentenced to death. Meanwhile, Kurdistan is acting like an independent state (or, rather, a satellite of Turkey). Iraq is falling apart.

As for Syria, while Obama fiddles, its cities burn in a civil war that could soon eclipse Lebanon’s in the 1980s.

The president who was once a foreign-policy neophyte now makes much of his experience. That claim depends heavily on a program of targeted assassination that liberals would have denounced if it had been pursued by his predecessor.

If Mitt Romney wants to be Barack Obama’s successor, he urgently needs to launch a metaphorical drone strike of his own—against a Mideast policy that is flaming out.

Like The Daily Beast on Facebook and follow us on Twitter for updates all day long.

Niall Ferguson is a professor of history at Harvard University. He is also a senior research fellow at Jesus College, Oxford University, and a senior fellow at the Hoover Institution, Stanford University. His Latest book, Civilization: The West and the Rest, has just been published by Penguin Press.