While the government of Israel and most of its people cheered when U.S. President Donald Trump announced U.S. withdrawal from the Iran nuclear deal, others worried that the Jewish state would be the first suffer from the decision. That view seemed to be vindicated when, within a day, Iran launched its first direct attack on Israel from its military bases in Syria. The Iranian rockets were either intercepted or fell short and landed in Syria. But there are those who are interpreting that barrage—and the subsequent Israeli retaliation—as an indication that Trump has made Israel more vulnerable and increased the chances of war.

Israeli Prime Minister Benjamin Netanyahu with U.S. President Donald Trump in Washington on March 5, 2018. Photo by Haim Zach/GPO

But truth is quite the opposite. Far from the U.S. exit of the deal increasing the peril to Israel, it was the nuclear pact itself that brought Tehran’s forces to Israel’s doorstep and raised the possibility of war. Trump’s move got rid of any theoretical restraints from Israel’s ability to strike, and the results were devastating for the Iranians. Equally important, the reaction to the Israeli attack from Russia—an ally of the United States, Europe and of Iran—spoke volumes about the growing problems in Tehran. While the situation is still both dangerous and fluid, thanks to the strength being shown by America and Israel, Iran is starting to lose ground in the region for the first time since the Obama administration began its push for détente with the Islamist regime.

Iran’s ability to threaten Israel from Syria has rightly raised fears of a new regional war in the last year. But in assessing the danger that this situation has created—and whether or not Trump is making it worse—it’s important to note how the situation arrived at this point.

The U.S. invasion of Iraq in 2003 that toppled the Saddam Hussein regime began the process by which Iran’s goal of regional hegemony became a realistic project. With its principle rival removed and the Shi’ite majority allied to Tehran empowered in Iraq, Iran immediately became stronger. That got even worse after the U.S. withdrawal from Iraq, which created a power vacuum filled by ISIS and Iran. But it was not until 2013, when the United States began to seek a nuclear deal in earnest that Iran’s position fundamentally changed.

At that point in time, Iran was completely isolated. With its economy tottering, Tehran was vulnerable; nevertheless, President Barack Obama provided it a lifeline when he demonstrated his eagerness for a nuclear deal at virtually any price. Iran benefited from negotiations during which America made concession after concession, effectively legalizing the Iranian nuclear program. A desire not to scare the Iranians away from the talks also led to a series of catastrophic American decisions about Syria.

While the world remembers Obama’s retreat from his “red line” threat to the Bashar Assad regime, the context for the U.S. decision not to punish the beleaguered Syrian government—and instead give the Russians carte blanch there—was the administration’s worry about alienating Syria’s Iranian ally. By staying out of Syria and handing over responsibility for eliminating chemical weapons there to Moscow, Obama put the nail in the coffin of any hopes of defeating Assad. U.S. timidity was a signal for both Moscow and Tehran to step up their intervention in Syria. That ensured victory for Assad’s allies as Iran’s Hezbollah auxiliaries and own forces made themselves at home in Syria after a war in which Assad’s atrocities drove millions from their homes and killed hundreds of thousands. By 2017, the Iranians were already building bases there.

The cross-border sparring between Israel and Iran didn’t start this week. But the consequences of actually firing on Israel have not been to Iran’s advantage. That move not only provoked Israel to hit back and take out much of their military capabilities, it also demonstrated that the Iranians are the ones who remain truly isolated.

Iran’s main goal right now is to separate the United States from its allies. That’s why it hasn’t—contrary to the fears of Obama loyalists and Trump critics—restarted its race for a nuclear weapon. The attack on Israel was a test to see how aggressively Israel would respond and whether the Europeans would criticize the Jewish state for defending itself. But those hopes were dashed when the Europeans condemned Iran. Israel’s actions were also strongly supported by the United States and also by Sunni Arab nations that fear Iran as much as the Israelis.

Even more troubling for the Iranians was the reaction from Russia. Moscow not only didn’t blast the Israelis for hitting their ally, but announced that it wouldn’t be supplying Iran’s Syrian allies with advanced S-300 missiles. That’s a sign that Tehran may be losing the diplomatic shield that has allowed it to operate with impunity in Damascus.

Is this the start of a turning of the tide in which Iran’s position will grow even weaker? That depends on whether Trump is serious about re-imposing sanctions and forcing Europe to decide whether they want to do business with Iran or maintain commercial relations with the United States. It’s also vital that he not withdraw U.S. troops from Eastern Syria, where they are fighting ISIS. The ground won from the Islamists cannot be handed over to Damascus or Tehran.

With its finances in tatters, a restive populace straining under difficult economic conditions and the yoke of a brutal theocracy, the ayatollah’s regime is in trouble. It can’t afford to defy the world and try to build a bomb, and it also knows that a U.S. administration no longer interested in creating daylight between its position and that of the Jewish state’s will not restrain Netanyahu’s counter-attacks.

The nuclear deal enriched and empowered Iran, giving it both the opportunity and cash to threatened Israel’s security. America’s decision to withdraw will make it poorer and, as we’ve already seen, more cut off. Though Trump will have to continue to prove that he understands the need to keep the pressure up, the first days after his announcement have already shown that it’s Iran that is getting weaker as a result of this move, not Israel.

Jonathan S. Tobin is editor in chief of JNS — Jewish News Syndicate. Follow him on Twitter at: @jonathans_tobin.