– For President Donald Trump and two of the allies he values most — Israel and Saudi Arabia — the problem of the Iranian nuclear accord was not, primarily, about nuclear weapons. It was that the deal legitimized and normalized the clerical Iranian government, reopening it to the world economy with oil revenue that financed its adventures in Syria and Iraq, and its support of terror groups.

Now, with his announcement Tuesday that he is exiting the Iran deal and will reimpose economic sanctions on the country and firms around the world that do business with it, Trump is engaged in a grand, highly risky experiment.

Trump and his Middle East allies are betting they can cut Iran’s economic lifeline and thus “break the regime,” as one senior European official described the effort. In theory, America’s withdrawal could free Iran to produce as much nuclear material as it wants — as it was five years ago, when the world feared it was headed toward a bomb.

But Trump’s team dismisses that risk: Tehran doesn’t have the economic strength to confront the United States, Israel and the Saudis. And Iran knows that any move to produce a weapon would only provide Israel and the United States with a rationale for taking military action.

It is a brutally realpolitik approach that America’s allies in Europe have warned is a historic mistake, one that could lead to confrontation, and perhaps to war.

And it is a clear example of Middle East brinkmanship that runs counter to what President Barack Obama intended when the nuclear deal was struck in July 2015.

Obama’s gamble in that deal — the signature foreign policy accord of his eight years in office — was straightforward. He regarded Iran as potentially a more natural ally of the United States than many of its Sunni-dominant neighbors, with a young, educated, Western-oriented population that is tired of being ruled by an aging theocracy.

By taking the prospect of nuclear weapons off the table, the Obama administration had argued, the two countries could chip away at three decades of hostility and work on common projects, starting with the defeat of ISIS.

It didn’t turn out that way. While the deal succeeded in getting 97 percent of Iran’s nuclear material out of the country, Iran’s conservatives and its military recoiled at the idea of cooperating on any projects with the West.

Months before it became clear that Trump had a decent shot at being elected, the Iranian military increased support for President Bashar Assad in Syria; it expanded its influence in Iraq and accelerated its support for terror groups. And it doubled down on deploying cyberattacks against targets in the West and in Saudi Arabia, embracing a weapon that was not covered by the nuclear accord.

Then came Trump, with his declaration that the deal was a “disaster” and his vow to dismantle it.

Now, suddenly, the world may well be headed back to where it was in 2012: on a road to uncertain confrontation, with “very little evidence of a Plan B,” as Boris Johnson, the British foreign minister, said on a visit to Washington.

Exiting the deal, with or without a plan, is fine with the Saudis. They see the accord as a dangerous distraction from the real problem of confronting Iran around the region — a problem that the Saudis believe will be solved only by regime change in Iran. They have an ally in John Bolton, the president’s new national security adviser, who shares that view.

Israel is a more complicated case. Prime Minister Benjamin Netanyahu has pressed Trump to abandon an arrangement that he has always detested. But Netanyahu’s own military and intelligence advisers say Israel is far safer with an Iran whose pathway to a bomb is blocked, rather than one that is once again pursuing the ultimate weapon.

At the core of Trump’s announcement Tuesday is a conviction that Iran can never be allowed to accumulate enough material to assemble a bomb. When the Europeans said that would require reopening the negotiations, Trump balked and decided instead to blow up the entire deal.

It was a classic Trumpian move, akin to the days when he would knock down New York buildings to make way for visions of grander, more glorious edifices.

But in this case, it is about upsetting a global power balance and weakening a regime that Trump has argued, since he began campaigning, must go.