Our romance with Iran was supposed to bring peace. Now, we might be in for an all-out Sunni-Shiite war in the Middle East.

In President Obama’s seven years in office, hostilities between Iran and Saudi Arabia grew by leaps and bounds. Over the weekend, things got much worse when the Saudis executed a firebrand Shia cleric, Nimr al-Nimr, accusing him of inciting an Iranian-backed Shiite uprising in their country.

Iran, as it’s often done since the 1979 revolution, organized a “spontaneous” attack on the Saudi embassy in Tehran, setting it on fire. Riyadh retaliated by expelling Tehran’s diplomats and severing ties, as did Bahrain and Sudan. The United Arab Emirates downgraded diplomatic relations, too. Others are expected to follow suit.

And us? Initially, the State Department denounced al-Nimr’s execution (46 others, mostly terrorists with ties to extremist jihadi groups, were also executed by the Saudis Saturday). Later, we denounced the embassy sacking.

Mostly, we called for calm, and Secretary of State John Kerry spoke to top Saudi and Iranian officials.

In background briefings American officials made it clear they see the Saudi execution as the provocation that lit the match. French Ambassador to the United States Gerard Araud even went so far as to explain away the mullahs’ diplomacy-by-torch. “Iran was obliged to react” to the Saudi provocation, he tweeted, adding, “Burning an embassy is spectacular but not war.” (Perhaps remembering that he, in fact, heads an embassy, Araud later deleted the unfortunate tweet.)

So are the Saudis really the bad guys here?

True, Riyadh’s justice system is no paragon of Jeffersonian ideals. Cruel and unusual punishment (stoning, limb-severing, throat slashing) is part of the system. We should certainly condemn it, rather than back the Saudi candidacy for a seat on the UN Human Rights Council, as we did last year.

But, hey, the supposedly aggrieved party here, Iran, is second only to China in using the death penalty, doubling the annual Saudi execution rate — including political opponents. Except rather than slashing throats, like the kingdom’s executioners, the mullahs hang people from cranes at city centers.

There are no angels here.

Meanwhile, the Saudis, our allies for a century, are at a crossroads. The aging King Salman is likely the last dynast of his generation. Mohammed, his ambitious and trigger-happy 30-year-old son, who’s currently deputy crown prince and defense minister, represents the increasingly assertive policies of a new generation.

The Saudi-Iran proxy war can be seen in the “civil wars” of Bahrain, Yemen and Syria.

As the Arabs see it, America constantly sides with Iran and its Shiite allies against the Sunnis — who make up more than 80 percent of the world’s Muslims.

Take Ramadi, where under our air umbrella the Iraqi army started reversing ISIS’s string of victories. The problem: Ramadi was mostly captured by Shiite units of an army under the command of Baghdad’s Iranian-backed government — much to the frustration of Iraq’s Sunnis.

The Saudis look on with dismay. They cherish the alliance with America, but last week they learned from our media the White House announced a plan to impose mild sanctions on Iran for illegally testing a long-range missile — only to reverse course a day later and postpone them after Iran’s complaints.

Such behavior reinforces the notion that America’s only true goal in the region is preserving a presidential legacy: the already much-dreaded Iran nuclear deal signed last July. Having all the leverage over Washington, which fears an Iranian walkout above all, Tehran no longer even needs nukes to cause real existential heartburn in Riyadh.

So why should we care? To answer that, let’s remember how the house of Saud became our ally to begin with: It’s the oil, stupid.

Riyadh is still keeping oil production up, assuring (along with our innovative new ways of extracting oil) that energy costs here and in Europe remain low. With that, Obama can boast an economic recovery, however modest.

But that assumes the Saudis will always remain our allies. Now that Obama has chosen their sworn enemy, they’re forced to seek other alliances, and their interests, such as keeping oil prices low, may soon shift.

Obama’s Iran deal was largely about geopolitical realignment. But if an all-out war breaks out, this last weekend may be remembered long after this deal is forgotten.