Mr. Trump is in a box of his own making. As a candidate, with no experience in foreign policy, he took a hard line against the deal, and he has stuck with that position, recently describing it in a speech to the United Nations as “one of the worst and most one-sided transactions the United States has ever entered into.” That judgment seems to reflect Mr. Trump's knee-jerk habit of repudiating President Barack Obama’s accomplishments, as well as showing the influence of Prime Minister Benjamin Netanyahu of Israel, who considers the Iran deal a travesty. Plus, historical antipathy to Iran in the United States remains strong.

Mr. Trump has twice agreed to certify the Iran deal, and his national security advisers are urging him to do it again. But he reportedly is annoyed by the process, and is determined to deliver on his campaign promise by the next certification deadline, Oct. 15. That the International Atomic Energy Agency, which monitors Iran’s nuclear activities; the American intelligence community; and the Pentagon confirm that Iran is honoring its commitments seems to have no effect on Mr. Trump’s thinking.

While most of Congress opposed the Iran deal when it was negotiated, many members now see its value and oppose provoking another nuclear crisis as the United States grapples with North Korea. But there is no guarantee of what Congress will do if a bill is introduced reimposing sanctions or seeking to renegotiate the deal. The smart thing, the right thing, for Mr. Trump to do is to recertify. There’s no doubt that Iran is a bad actor on many fronts, not least in its roles in Syria and Yemen. But the United States will have a greater chance of addressing those concerns if it rigorously abides by the nuclear deal and maintains unity with its partners in that endeavor.