TIME is running out for Donald Trump to make up his mind about the Iran nuclear deal of 2015. Before May 17th President Trump must decide whether to continue Barack Obama’s suspension of nuclear-related sanctions—Iran’s reward for constraining its nuclear programme. If Mr Trump does not issue a waiver, sanctions will snap back. The other signatories to the deal will see America as the aggressor. Unless Iran goes on to violate the deal flagrantly, they will not follow suit. The chances are that Iran would then slowly crank its programme up again. That would be a terrible outcome.

The Joint Comprehensive Plan of Action (JCPOA), as the deal is known, has got Iran to mothball most of its uranium-enrichment centrifuges and redesign its nuclear reactor at Arak to produce much less plutonium. Before the JCPOA, Iran was just a few months away from being able to make an atom bomb; that has been pushed back to a few years.

Mr Trump’s words suggest that he thinks the agreement is already dead. What Mr Obama saw as his greatest foreign-policy achievement, his successor has branded “one of the worst deals I’ve ever seen”.

However, the reality is more ambiguous. Rex Tillerson, America’s secretary of state, sent a letter to Congress on April 18th declaring that Iran has complied with the terms of the nuclear deal—a judgment confirmed by James Mattis, the secretary of defence, on a visit to Israel, Iran’s implacable enemy. Iranian compliance is good news. But, strangely, the State Department website buried it under the headline “Iran continues to sponsor terrorism”. Next, calling the deal flawed, Mr Tillerson said that the National Security Council would undertake a 90-day review to decide whether to maintain the suspension of the sanctions. And Mr Trump himself said that Iran had “broken the spirit of the agreement”. Asked whether America would still honour it, he said: “It’s possible that we won’t.”

Mr Tillerson complains that the deal only delays Iran from becoming a nuclear power and that its regional aggression is unrestrained. He is right. Yet the deal intentionally separated the nuclear programme from regional security because lumping the two together would have created stalemate. Some valuable provisions of the agreement, such as highly intrusive monitoring of Iran’s nuclear activities by international weapons inspectors, are permanent. Besides, the alternative is war.

Critics are also right to say that the idea that Iran might moderate with time is optimistic. But it is no less optimistic than tearing the deal up in the hope of somehow getting something better. Mr Trump may reckon that by sounding tough he will win tweaks to the deal that he can claim as revolutionary. But that is a dangerous game. The Iranian presidential election comes two days after the waiver deadline on May 17th. If Mr Trump demurs, the chances of a hardline candidate winning will be greatly improved. Republicans in Congress are also spoiling to impose new sanctions on Iran. If the hardliners on both sides triumph, the deal’s fate will be sealed.

Tough and self-defeating

Refusing to issue the waiver would also undermine America’s foreign-policy goals in Asia. Mr Tillerson compared the Iran deal to past failures to curb North Korea’s nuclear programme. In fact, the JCPOA reflects the lessons learned from those failures by building in extremely detailed requirements. If America hastily rips up the Iranian deal when Iran is compliant it would destroy any chance of one with North Korea.

Mr Trump can issue the waiver pending completion of the review of the nuclear deal. If that helps him find a way back from his campaign rhetoric, it will have served a purpose.