President Trump seems determined to pull out of the Iran nuclear deal, with no reason apart from the fact that he wants to. His hostility to the deal—based largely on a misunderstanding of its contents—doesn’t mean that he can cancel America’s obligations by himself. But he can trigger a process in which Congress—much of which is equally hostile to the deal—votes to withdraw.

The deal—formally known as the Joint Comprehensive Plan of Action, signed in 2015 by Iran, the five permanent members of the U.N. Security Council (the U.S., Russia, China, Britain, and France), as well as Germany, and the European Union—required Iran to dismantle its nuclear program in a way that blocks the country from building a nuclear weapon for more than 10 years. In exchange, the other signatories agreed to lift sanctions that had been imposed on Iran as a result of its nuclear activities. (Other sanctions, related to Iran’s ballistic missile program, support for terrorism, and human rights violations, would remain in place.)

Because it was a multinational arrangement, not a formal treaty, Congress had no say in ratifying the deal. But Congress did pass the Iran Nuclear Agreement Review Act, which requires the president to certify, every 90 days, that Iran is (or isn’t) abiding by the deal’s terms and allowing international inspectors to verify compliance. If he doesn’t sign this certification, Congress has 60 days to consider a bill to reimpose the sanctions—a period that cannot be blocked or delayed by procedural motions.

Since taking office, Trump has certified twice that Iran wasn’t cheating on the deal, but the second time—on July 17—he did so reluctantly. According to the New York Times, he spent 55 minutes of an hourlong meeting with his national security advisers moaning that he “did not want to” sign the certificate. He finally relented, having no choice: The International Atomic Energy Agency and the U.S. intelligence agencies all agreed, Iran was abiding by the accord and giving inspectors full access to records and facilities.

At the end of the meeting, Trump told his advisers that he wasn’t going to keep doing this, every 90 days, indefinitely. This week, he went further, telling the Wall Street Journal, “If it was up to me, I would have had them [the Iranians] non-compliant 180 days ago.” Asked if he expected them to be declared noncompliant next time, Trump replied, “Personally, I do.”

Notice: Trump was not addressing whether the Iranians really were, or will be, compliant. He doesn’t care about that. After all, 180 days ago, they were objectively seen to be compliant, but, if it had been up to him, in his words, “I would have had them non-compliant”—regardless of the actual facts—and he expects to declare them noncompliant in the next review, which takes place Oct. 16.

As he does with many issues, Trump is creating his own reality and finds nothing wrong with that.

If he declares Iran noncompliant, or even if he merely declines to declare it compliant, the matter of reimposing sanctions passes to the hands of Congress, whose Republican majority has never liked the deal, in large part because it was a crowning diplomatic achievement of President Barack Obama.

At a rally in Youngstown, Ohio, this week, Trump denounced the deal, as he has many times, as “the single worst deal I’ve ever seen drawn up by anybody,” repeating the claim that it called for the United States to give Iran $100 billion to $150 billion and another $1.7 billion in cash. In fact, however, the U.S. is not giving Iran anything; rather, it is freeing Iran’s own assets, which were frozen in Western bank accounts as punishment for the country’s illegal, covert nuclear program. Plus, Trump’s figure of $100 billion or so amounts to assets held worldwide, not just in the United States.

Releasing those funds conforms to the logic of sanctions: Assets are frozen to punish a country for certain behavior; if the behavior stops, the assets are unfrozen. This isn’t a gift; it’s a logical piece of the deal. As for the $1.7 billion in cash, this represented the Obama administration’s settlement of a legal dispute dating back 37 years, when Iran (then ruled by the Shah) paid for a huge weapons order, which the United States didn’t deliver (since, by the time the order was ready to go, the Ayatollah Khomeini had seized power). Refunding the money, plus interest, doesn’t amount to a giveaway either.

If Trump refuses to sign the certification in October, does that mean the deal is over? Not necessarily. First, Congress might not vote to reimpose sanctions. Many U.S. corporations, especially airline companies, have started doing business with Iran and would lobby against the cutoff—especially since their foreign competitors will continue profiting. That’s another reason Congress might not go along with Trump: The other countries that signed the Iran deal aren’t likely to follow Trump’s lead and reimpose their own sanctions. Trump could order that, as part of his withdrawal, U.S. banks must refuse to do business with any foreign company that continues to violate the sanctions (which, at that point, only the United States would be imposing). But this move would arouse massive resistance from financial institutions, especially if Iran was actually still complying with the deal. And if the other countries did go along, if multinational sanctions really were reimposed, then Iran would likely resume its nuclear program—and, under the circumstances, many world leaders wouldn’t blame Iran; instead, they’d blame the United States.

Finally, Trump’s national security advisers have all said that, while they’re dissatisfied with certain aspects of the Iran deal and suspicious of the Iranian regime generally, the deal is better than no deal—as long as the Iranians comply with it—and, in any case, a U.S. withdrawal would damage our diplomatic credibility and our relations with the allies who also signed it.

In other words, if Trump follows his instincts, he will set off a crisis of massive proportions—with Congress, his advisers, U.S. businesses, banks, and allies—and for no reason at all, except that he doesn’t like Iran, Obama’s successes, or complicated things that he doesn’t understand.