By now it’s become a Washington cliché: Barack Obama stumbling cluelessly through a Middle East in flames. He’s leading from behind, surrendering to Iran, withdrawing from the world, pivoting to Asia. He tried to disengage from Middle East entanglements, but the region sucked us back in.

Or did it? Here the cliché gets muddled. In one version, we’ve abandoned longtime allies like Israel and Saudi Arabia, who are left to battle the Iranian threat alone. In another version, we’re fighting on too many fronts — Iraq, Syria, Yemen — with no clear idea who’s the enemy.

We’re fighting alongside Sunni Saudi Arabia against Shiite Iran’s proxies in Yemen. We’re fighting alongside Shiite Iran against Sunni ISIS in Iraq. We’re supporting Syrian rebels battling against both ISIS and Iran’s Syrian proxy, the Assad regime. Meanwhile we’re jawboning in Switzerland to make Iran eliminate half its centrifuges. And keep half.

In one telling, Obama lacks an overall foreign policy vision, a must for real leaders. In another, he’s secretly adopted the arcane theory of “offshore balancing,” a modified isolationism. The idea is, you use naval and air power rather than ground troops to defend your friends. Which doesn’t sound quite like isolationism, but never mind. One neoconservative, Lee Smith, wrote in Tablet last year that Obama had adopted Israel-bashing “balance” maven Stephen Walt as his foreign policy guru, though Walt’s never been to the Obama White House.

How did things get so confused? Actually, it’s rather simple. Let’s start at Square One.

In early January 2002, four months after the September 11 attacks, Israeli national security council director Uzi Dayan met in Washington with his American counterpart Condoleezza Rice. She told him — to his surprise, he later told me — that President Bush had decided to invade Iraq and topple Saddam Hussein. A month later Dayan’s boss, Prime Minister Ariel Sharon, met with Bush in the White House and offered some advice, based on decades of Israeli intelligence.

Removing Saddam, Sharon said, according to three sources with direct knowledge, will have three main results, all negative. Iraq will implode into warring tribes of Sunnis, Shiites and Kurds. You’ll be stuck in an Iraqi quagmire for a decade. And Iran, a far more dangerous player, will be rid of its principal enemy and free to pursue its ambitions of regional hegemony. Bush didn’t agree.

Israeli leaders continued pooh-poohing Iraq all spring. Dismissal turned to alarm in August, when Iranian dissidents released evidence that Iran was pursuing nuclear weapons. In September Sharon told his cabinet to stop discussing Iraq. It was annoying the White House.

On September 12, however, a different Israeli voice visited Washington: ex-prime minister-turned-private citizen Benjamin Netanyahu. A longtime Sharon rival, closely allied with Washington’s neoconservatives, he’d been invited to address the Republican-led House as an expert on Iraq. Baghdad, he said, was hiding mobile centrifuges “the size of washing machines.” Moreover, “if you take out Saddam, Saddam’s regime, I guarantee that it will have enormous positive reverberations on the region.” Throughout the Middle East, including Iran, populations will be inspired to topple their own dictators.

Bush, of course, listened to Netanyahu and the neocons, not Sharon and his generals. Alas, Sharon was right. Iraq imploded. Iran surged. The invasion had reverberations, but hardly positive. The rest is history.

Iran, we later learned, briefly halted nuclear research in 2003, fearing it was next on Bush’s hit list. Once it realized it was safe, it resumed work. The United Nations now started churning out resolutions condemning Tehran for violating its signed commitments under the Non-Proliferation Treaty. Iran dutifully sat with France, England and Germany and agreed to behave, but kept working anyway. There was nobody to stop it.

In Iraq, as Sharon predicted, removing Saddam’s Sunni-dominated dictatorship allowed the Shiite majority to take over. Sunnis were marginalized. Saddam’s army was disbanded rather than coopted. The Shiite-controlled government, though U.S.-backed, effectively allied itself with Iran, which now controlled an arc from the Persian Gulf to the Mediterranean.

In late 2003 Iraq’s Sunnis began fighting back. Leading the insurgency was Abu Musab al-Zarqawi, a Jordanian-born terrorist with a gruesome penchant for decapitation. In 2004 his organization, swollen with Saddam’s veterans, intensified the fighting and took the name Al Qaeda in Iraq. Zarqawi was killed in 2006, but the organization was undeterred and renamed itself the Islamic State in Iraq. In 2011 it entered Syria to join the growing civil war there, eventually renaming itself yet again as the Islamic State in Iraq and Syria, or ISIS.

In 2009 two more regimes changed: Washington and Jerusalem. Barack Obama entered the White House on a wave of popular disgust with the long, pointless Iraq war. Ehud Olmert, Ariel Sharon’s protégé, was forced from office amid scandal and his Kadima party was replaced by Benjamin Netanyahu’s Likud.

Netanyahu immediately set about sounding the alarm about Iran’s nukes. A series of U.N. sanctions got nowhere. Ditto U.S. and European sanctions under both Bush and Obama. In 2006 the three powers negotiating with Iran were joined by Washington, Moscow and Beijing. But Bush’s Washington took a back seat, reluctant to engage the enemy. Russia and China, noting America’s passivity, weren’t serious.

Obama upgraded U.S. participation in 2009. This jolted Russia and China to attention but outraged Netanyahu and the Republicans. Netanyahu now began eyeing a military attack. His generals and spymasters resisted, warning that a solo Israeli attack wouldn’t work and America wasn’t ready for another war. Iran’s working centrifuges multiplied from 164 in 2009 to 10,000 in 2012.

Netanyahu tried pressuring Obama, but the gambit got mired in Washington’s partisan infighting. Relations turned poisonous. Looking for other answers, Bibi fired one security adviser after another but kept getting the same response: Work with Washington. Finally in 2013 Obama opened a back channel to Tehran, leading to the current compromise talks. Then came the explosion in Bibi’s relations with Obama — and, less noticed, with his generals.

And what of those democratic regional reverberations? They came. In January 2011 an economic protest in Tunisia was coopted by hopeful democrats and became a revolution. Protests spread to Egypt, then Libya, Syria and Yemen. It seemed to be just what Netanyahu had predicted, an Arab Spring reverberating from Saddam’s downfall. So, at least, said Dick Cheney, Condoleezza Rice and a bevy of academics.

But it didn’t work out as Netanyahu promised. The autocrats fought back. Liberal democrats, never a significant force, collapsed before Islamist radicals. Libya descended into chaos. Syria became a slaughterhouse. Yemen fell into civil war. Obama dithered, looking for bloodless diplomatic solutions to the whirlwind. America’s Arab allies, Saudi Arabia, Jordan and Egypt, fumed at the inaction. Washington wanted the moderate Arab powers to take charge of their own affairs, but that wasn’t how they rolled.

The final straw came last summer, when Yemen’s capital fell to a little-known Shiite sect, the Houthis. In the 1960s, backed by the Saudis, they’d battled Egypt’s Nasser to defend the traditional imamate against his republicans. They’re still battling the republic, but now Iran’s backing them, part of its Shiite imperial ambition. The Saudis, seeing an Iranian pincer action on their southern flank, are finally fighting back, with backing from the full Arab League. As in Syria, as in Libya, Obama’s providing air cover while Arabs see to their own affairs. It’s Pax Americana for a post-Iraq, post-abundance era.

Nowadays you don’t hear much about Iraq being the inspiration for the Arab Spring, except in academic papers and intelligence assessments. It’s too embarrassing.

Contact J.J. Goldberg at goldberg@forward.com