Following an Iranian rocket attack Thursday launched from Syria against Israel that prompted the Jewish state to send warplanes and missiles into Syria to destroy Iranian military targets, the Trump administration needs to rethink its Middle East policy.

The central question now facing President Trump and his national security team is what – if anything – they will do to prevent the Iranian-Israeli conflict from erupting into a regional war that engulfs American allies in the Middle East and possibly draws in the United States as well.

The Iranian regime embodies the aggressive and violent Shiite extremism of its founder, Ayatollah Ruhollah Khomenei. It is ruled by radical clerics who hate America, fear Western democracy, persecute non-Muslims, and above all hate Israel and Jews. When Iranian leaders say they want to destroy Israel they aren’t engaging in hyperbole. They really mean it.

On the sides of its missiles, Iran paints genocidal slogans such as “Israel must be wiped out.” Not exactly subtle. But until early Thursday, Iran had never turned its weapons directly on targets inside of Israel. Then Iran crossed that line, firing about 20 missiles at the Jewish state.

Only the United States can shape the diplomatic terrain in a way that reduces the likelihood of a devastating war. This could begin with a clear statement by President Trump that Iran’s build-up in Syria poses a serious threat to America’s national interests

The Iranians brazenly used Syria as the forward base for their aggression. Israel punished Iran’s assault with a wave of retaliatory warplane and missile strikes intended to destroy much of the military infrastructure Iran had built up in Syria.

How did we get to this point?

While pursuing a deal with Iran designed to keep it from developing nuclear weapons – a deal President Trump withdrew from this week – the Obama administration shied away from confronting the Iranian move into Syria.

President Trump wisely broke with a key tenet of the Obama administration’s Syria policy when he launched air strikes against Syria in April to enforce the red line prohibiting Syrian dictator Bashar Assad from using chemical weapons. President Obama had drawn that red line, but never attacked Syria when Assad called his bluff and murdered more than 1,400 men, women, and children in a chemical attack on the outskirts of Damascus.

However, the continuity between the policies of Presidents Obama and Trump on Syria is more significant. Like his predecessor, President Trump has refused to treat Iran’s military buildup of troops and weapons in Syria as a threat to the United States – although he seemed to waver on this point in a recent appearance with the president of France.

At first glance, inaction seemed to serve American interests. Why interfere when Shiite Muslim extremists were killing off Sunni Muslim extremists and vice versa?

The first indication of this strategy’s failure was the rise of the Islamic State terrorist group, which carried out or inspired massacres in Paris and Brussels in Europe; in San Bernardino and Orlando in the U.S; and across the Arab world. That left America with no choice but to send its troops back into Iraq and then into Syria.

The second unexpected danger of President Obama’s passivity was the active intervention of both Russia and Iran in Syria. Assad’s regime has always had close ties to Moscow and Tehran, yet the Syrian civil war reduced the Assad government to a shell of its former self – allowing the Russians and Iranians to exploit it as they wished.

With the threat posed by the Islamic State increasingly in remission, the danger of the Iranian presence in Syria has moved to the forefront. In February, Tehran hinted at its readiness to attack Israel when it launched an armed drone into Israeli air space from the T-4 base in Syria.

The timing of the February attack is significant because it came well before any indication that President Trump had decided to withdraw from the Iran nuclear deal. Thus, it would be a mistake to interpret Thursday’s Iranian rocket attack on northern Israel as indirect retaliation for President Trump’s decision. Instead, the Iranian attack was the latest round of a pre-existing conflict.

Unfortunately, the cost of complacency by both Presidents Obama and Trump is now apparent. Iran is ready to bring the entire region to the brink of disaster. Israel is prepared to strike back hard, as it always has, against those who threaten its existence.

Yet only the United States can shape the diplomatic terrain in a way that reduces the likelihood of a devastating war. This could begin with a clear statement by President Trump that Iran’s build-up in Syria poses a serious threat to America’s national interests.

President Trump has shown that he is not afraid to discard conventional wisdom about what works and what doesn’t work in foreign affairs – both in Middle East politics and in Asia, with his planned meeting with North Korean leader Kim Jong Un.

In the Middle East, experts warned that moving the U.S. embassy to Jerusalem would ignite a furor across the region. But President Trump ordered the move anyway.

To the surprise of the experts, Arab governments have displayed increasing sympathy toward Israel despite the embassy move, because they share Israel’s fear of Iran. Improbably, the foreign minister of Bahrain even condemned the Iranian attack on Israel on Thursday and justified Israel’s retaliation as a matter of self-defense.

This coming Monday, the president’s daughter and White House adviser Ivanka Trump and other dignitaries will participate in a ceremony officially relocating the U.S. Embassy in Israel from Tel Aviv to Jerusalem. Both Israelis and Americans will praise the courage that was required to recognize that Jerusalem is and always will be the capital of the Jewish state.

Acknowledging that truth is no different than acknowledging that Washington is the capital of the U.S., Paris is the capital of France, or Moscow is the capital of Russia. The recognition enhances Israeli security by challenging all those, including Iran, who constantly seek to delegitimize Israel.

Yet the gains to Israel’s security brought about by the relocation of the U.S. Embassy pale in comparison to the danger of a growing Iranian arsenal in Syria and an even greater supply of weapons that Iran has passed along to Hezbollah, its terrorist auxiliary in Lebanon. Senior Israeli officers estimated in 2015 that Hezbollah already had an arsenal of 150,000 rockets.

While defending a loyal ally has considerable value, protecting Israel is not the ultimate reason for the U.S. to resist the entrenchment of Tehran’s forces in Syria.

When rockets rain down on Israeli civilians, Israel may retaliate against targets in Iran. Then Iran may hit back against U.S. or allied targets in the Persian Gulf, and so on. The U.S. can wait for this threat to materialize, or it can begin working now to defuse it.

Iran’s failure to halt its aggressive and hostile behavior following the approval of the nuclear deal proved that waiting for the nation’s rulers to change is futile. America, led by President Trump, needs to show strength and firmness in the face of Iran’s attack on Israel and its continued support of Assad.