Is it possible President Donald Trump may have perfectly played the Iran conflict?

He’s been criticized for different and various reasons by people on the left and on the right. There’s been a real concern that the president could get us into a war with Iran.

It’s early but it seems like Trump has effectively fired a warning shot at Iran to ramp down its continuing escalations—without risking more American lives. If that’s how it plays out, it will be hard not to credit the president for his handling of this matter.

To those critical of the president’s action to take out Qassim Suleimani, the Iranian Quds Force commander, it’s important to look at what led up to that action.

Last May, Iran began attacking ships, including three oil tankers, transiting the Strait of Hormuz. This is a crucial international shipping channel, especially for the oil and gas industry. Iran had a past history of mining these waters and causing energy price spikes.

Last June, Iran shot down an unmanned U.S. drone. Trump reportedly ordered and then called off retaliatory strikes.

Last September, Yemeni rebels attacked Abqaiq, the massive Saudi oil processing facility, resulting in a loss of 5% of the world’s oil production. The U.S. claimed that evidence pointed to Iran being behind the attack. After an investigation, the U.K., Germany, and France—all interested in deescalating any potential Iran/U.S. conflict—also concluded that Iran was behind the attacks.

Last November, Iran announced that it had resumed uranium enrichment.

Finally, in December, Iran attacked U.S. interests in Iraq, killing an American contractor, and then used proxies to directly attack the U.S. embassy in Iraq.

These last attacks crossed the red line Trump had set for Iran.

According to The Washington Post, last May, Trump sent Secretary of State Mike Pompeo to deliver a message to Iran that if even one American were killed by the regime or its proxies, a U.S. military counterattack would result.

Trump kept his word. After the death of the American contractor and the attack on the embassy, he ordered the attack that killed Suleimani.

This was a serious and potentially dangerous response from the president. Suleimani was a longtime senior leader in the Iranian regime. He was also a really bad guy with American blood on his hands.

Suleimani had been in charge of coordinating Iran’s terrorist proxies. He helped these terrorists develop more advanced improvised explosive devices that were used to kill hundreds of U.S. soldiers in Iraq.

Despite Suleimani’s history, many of Trump’s strongest supporters worried that he may have gone too far in his response. Trump had campaigned on disentangling America from Middle Eastern wars.

The left was less subtle. Former Vice President Joe Biden said Trump “just tossed a stick of dynamite into a tinderbox.” He warned that “we could be on the brink of a major conflict across the Middle East.” The hashtag “World War III” trended on Twitter for days.

Iran warned of grave repercussions. On Wednesday morning, Iran followed through, launching numerous missiles at two Iraqi bases housing American troops.

Interestingly though, Iran warned the Iraqi government before the attacks, and the Iraqi government, in turn, warned American leaders. Due to this warning and precautions that were therefore taken, no American or Iraqi lives were lost.

Trump administration officials claimed that Iran purposely planned the attacks in a way that would minimize the chance for any loss of American life.

The day after our attack on Suleimani, Trump said: “We took action last night to stop a war. We did not take action to start a war.”

In his televised address after the Iranian response, Trump said, “Iran appears to be standing down, which is a good thing for all parties concerned and a very good thing for the world.”

This does not sound like a guy trying to begin World War III, as many on the left contend.

Trump is many things, but one thing he’s not is an ideologue. Many U.S. policymakers have been itching to more aggressively confront Iran. On the other side, many are committed to extracting America from the Middle East altogether.

Trump, for his part, stood by for months while Iran took increasingly belligerent actions that threatened world oil markets and shipping channels. The president gave a clear warning to Iran that his red line was the loss of American life.

Iran crossed that red line, and Trump responded forcefully.

There’s a strong chance that the Iranian regime would have pressed forward with more brazen attacks if Trump did not respond.

There is still time for things to spiral out of control, but in the wake of Iran’s muted response, it appears that Trump pushed back just hard enough to send a strong message to the Iranians without entangling America in another unwanted war.

If that turns out to be the case, people on all sides of this debate owe Trump a debt of gratitude.