On June 20, with 10 minutes to spare, President Donald Trump aborted a military strike against Iran intended to respond to a downed drone that the U.S. claims was flying in international airspace.

Trump made the right call. But he’s been wrong in nearly every decision leading up to his abrupt turnaround. And his judgment is suspect regarding the strike itself. When told that 150 might die, he called it off, sparking these key questions: Did the president not ask for a casualty estimate before ordering military action? Or did his advisers not offer one?

Either way, the commander in chief and the country have been ill-served by hawks such as Secretary of State Mike Pompeo and National Security Adviser John Bolton, who has openly opined as far back as 2015 that the U.S. should bomb Iran to prevent it from developing a nuclear weapons program. There’s a risk that next time Trump will listen to that advice and the U.S. will find itself in another Mideast war even though the president has railed against the outcomes in Afghanistan and Iraq.

Only in that event the U.S. likely would be going to war without the NATO allies that rallied to America’s side after 9/11, or even the limited “coalition of the willing” that gave an international sheen to the foreign policy catastrophe in Iraq. Because ally and adversary alike disagreed with Trump’s abrogation of the Iran deal (or Joint Comprehensive Plan of Action) to prevent proliferation in Iran.

According to international inspectors and the administration itself, the agreement was working, although it did not curb Iran’s regionally destabilizing behavior in Syria, Lebanon, and Yemen. But this malice is exactly why a multinational pact such as the JCPOA — which was hammered out between Iran, the U.S., the U.K., France, Germany, the European Union, China and Russia — was an important, albeit imperfect, way to thwart a proliferation program.

The administration’s “maximum pressure” tactic of cyberattacks and ramping up economic pain through sanctions (more than 1,000 specific sanctions have been levied since the withdrawal from the JCPOA, with more announced Monday), as well as U.S. pressure on other nations not to buy Iranian oil, has been effective in eroding Iran’s economy. But it may be backfiring, because it has emboldened hard-liners who never supported the pact to push back in dangerous ways, including the drone downing and allegedly engineering attacks on oil tankers. And now Tehran has warned that it may soon exceed levels of uranium enrichment allowed under the JCPOA.

Iran’s government may have calculated that it cannot wait out the Trump administration and that an inflection point is needed to internationalize its way out of the crisis, raising the risk of miscalculation that could spark war.

While Trump’s go-it-alone approach has alienated allies, he must try to garner global support for a diplomatic de-escalation of the impasse. While he should make it clear that a direct attack on U.S. personnel would trigger a proportional military response, he should tone down the bellicosity and amplify multilateral dialogue. Pompeo’s Mideast trip is an appropriate step, but a more profound presidential effort is needed with key world leaders, who fortuitously will be in Osaka, Japan, this week for the G-20 Summit.

The time for diplomacy is now — before it’s too late.