As the two negotiators who initiated the secret talks that led to the 2015 Iran nuclear agreement, we are intimately familiar with the deal’s strengths, its inevitable imperfections and the wider challenge posed by Iran.

In an ideal world, we would have erased Iran’s knowledge of the nuclear fuel cycle, eliminated its missile arsenal, stopped its dangerous use of proxies across the region, and transformed it into a less disruptive regional power.

But we don’t live in an ideal world. Diplomacy requires difficult compromises. And the nuclear deal achieved the best of the available alternatives. It cuts off Iran’s pathways to a bomb, sharply constrains its nuclear program for a long time, and provides for unprecedentedly strict monitoring and verification. Diplomacy avoided another war in the Middle East and averted the kind of crisis we now face with North Korea.

But today, after two years of repeated affirmations of Iran’s compliance by our intelligence community and the International Atomic Energy Agency, American policy is at a fork in the road.

The smart way to proceed would be to keep the world’s powers united and the burden of proof on Iran. That means working with partners on relentless enforcement; enhancing sanctions that punish Iran’s non-nuclear misbehavior, including its missile program and sponsorship of terrorism; working closely with Arab partners to deter Iran’s meddling in their internal affairs; and making plain our concerns with Iran’s domestic human rights abuses. It means using the diplomatic channel we opened with Iran, after 35 years without such contact, to avoid inadvertent escalation. And it means making it clear that after some restrictions in the deal expire, the United States and the world will still not allow Iran to advance its nuclear program in threatening ways.

Then there’s the foolish way — which the Trump administration seems perpetually tempted to pursue. President Trump has already declared his hostility to the agreement. On Wednesday, he said he had reached a decision about the future of the deal, without saying what it was.

But speaking to the United Nations General Assembly on Tuesday, Mr. Trump called it an “embarrassment” and “one of the worst and most one-sided transactions the United States has ever entered into.” This kind of posturing is turning Washington, rather than Tehran, into the diplomatic outlier, and sapping our partners’ will to keep Iran’s feet to the fire.

The costs are already apparent. When the administration telegraphs plans to use its doubts about inspections as an excuse to leave the deal, it’s not surprising that the I.A.E.A. and our negotiating partners resist American requests to activate the deal’s provisions for access to suspicious military sites.

And when Mr. Trump suggests abandoning this “bad” deal because the only “good” deal is one that magically covers all of Iran’s regional activities, it only becomes harder to mobilize international pressure against Iran’s Revolutionary Guard and its proxies like Hezbollah.

By failing to operate in good faith, the administration has weakened — not strengthened — our hand.

Now the administration is flirting with a strategy that risks bringing about the ultimate demise of the deal. The concept is not to abrogate the agreement outright, but to put it on a path to failure through too-clever-by-half contrivances. This would involve refusing to certify Iranian compliance with the deal on principle rather than evidence, and asking Congress to reimpose sanctions that the agreement lifted. Meanwhile, our continued adherence would be tied to a commitment by Iran and our partners to accept new terms.

International partners would see that behavior for what it is — America failing to live up to its end of a bargain. If the deal collapses, we would find ourselves as isolated as we were after the 2003 Iraq war. Iran could resume its nuclear advance without united international opposition. The rift in trans-Atlantic relations would widen — a gift beyond Vladimir Putin’s wildest dreams.

And we would lose all of our credibility in seeking a diplomatic resolution to the North Korea nuclear crisis.

If he really wants to back out of the deal, Mr. Trump should say so. But then he owes it to the American people to explain how he would block Iran from developing a nuclear weapon, curb its destabilizing behavior in the region, and prevent all the other calamitous consequences of his unilateralism. And fantasy scenarios where we get everything — and Iran gives up everything — will not suffice.

We already have one nuclear crisis with North Korea. We don’t need a second one. The administration should back off from its dangerous folly, commit to the deal, enforce it to the hilt, and work with our partners on a long-term strategy to deal with Iran’s challenge.

This article was originally published in the New York Times.