Donald Trump insisted last month that he didn’t think about Americans’ finances when negotiating with Iran.

He’s clearly changed his mind.

“I didn’t want to see economic catastrophe. If you kept this going, that could have happened,” Trump said Wednesday, in seeking to explain what critics see as a deeply flawed agreement to end the war.

Trump’s comment, in France, was a revealing moment. It shows how, under political pressure, he often grasps for short-term advantage over the long-term strategic grind. And it underscores his reverence for the wisdom of the markets, which he said were “more brilliant” than any of his advisers “other than me, of course.”

But Trump’s embrace of a peace plan that one Republican senator warned had Ronald Reagan “rolling over in his grave” risks weakening the US position going into critical 60-day talks that could define Iran’s nuclear destiny.

The agreement, designed to pave the way to those meetings, seems to cede almost all US leverage and hands Iran billions of dollars in revenues up front by waiving sanctions. It may therefore dent Trump’s self-conjured mystique as the world’s great dealmaker — which lifted him from reality TV to the White House.

So why did he make it?

The president tried to bomb Iran into submission for weeks. He issued dire threats to destroy its civilization. And when diplomacy stalled, he sent US bombers and missiles back aloft last week.

But in his epiphany about the cost of the war, he might finally have found what he’s been looking for almost since launching the conflict in February: a way out.

Sometimes, amid his cacophony, Trump produces candor that is rare in a president.

After the G7 summit, Wednesday, he confided that he’d studied how the stock market “shot up like a rocket ship” every time he spoke of possible peace with Iran and then would dip “very, very big” when headlines augured against a deal.

“The one president I did not want to be was the late, great Herbert Hoover,” he said, referring to the 20th-century commander in chief blamed for the Great Depression that wiped out investors and pitched millions of Americans into destitution.

The blowback from the Iran war hasn’t been as extreme, and the US economy remains robust. But the war sent gasoline prices soaring, helping to spike inflation, and its consequences appeared certain to deepen quickly.

Trump’s approval ratings, meanwhile, have dropped into the 30s, and the economic fallout from the war made him seem even more oblivious to the affordability crisis stalking many voters — which he again on Wednesday blasted as a smear campaign by Democrats.

Trump’s reasoning for ending the war is remarkable in many ways.

It will embolden critics who believe that the president often designed his various statements about the war — especially early in the week — to create a reaction on the stock market and to lower oil prices.

More seriously, his admission appeared to validate Iran’s strategic insight that the cost of the conflict would be more than Americans could bear once an initial US and Israeli aerial onslaught settled into a stalemate. This means Tehran’s new trump card — the capacity to shut down oil exports through the Strait of Hormuz — just got even more powerful.

Trump warned Wednesday that if Iran didn’t live up to its side of the agreement, he’d “drop bombs on their head.” But a relentless weekslong air war didn’t bring about regime change or force the Islamic Republic into a deal that favors Washington. So it may logically conclude Trump wouldn’t risk stock market routs and oil price hikes to enforce his demands. And a threat to bomb Iran again seems to be a contravention of the first clause of the memorandum of understanding (MOU), which bars the US from using “the threat or use of force against each other.”

Earlier in the conflict, the president seemed susceptible to critiques of Republican senators who feared he’d gone soft on Iran. But with the MOU signed, it will be harder for him to back out or change its terms.

The problem is not that Trump is wrong to end the war. If the fighting stops now, many American and Iranian lives may be saved. And an easing of economic fallout would make a measurable difference to the lives of many working Americans.

By paying such a high price to stop the fighting, Trump is effectively sending a message, not just to Iran but to other adversaries, that Washington’s resolve in military conflicts can be undermined if they find ways to turn up political heat through economic warfare.

He also appears to have abandoned Iranians after assuring them at the war’s beginning that it offered their “only chance for generations” to overthrow their brutal government. In a huge concession to Tehran, the memorandum commits both the United States and Iran to “refrain from interfering in each other’s internal affairs.”

Trump might have tied not only his own hands, but those of his successors.

Trump insisted after the G7 summit in France on Wednesday that the agreement would end the conflict and reopen the Strait of Hormuz. He’s placing a huge bet on a familiar assurance by Iran that it won’t seek a nuclear bomb that has previously been undermined by its enriching of uranium close to weapons-grade levels.

He also argued that his Iran policy needed to be judged across his two terms. He claimed that his decision to assassinate Iran’s security chief Qasem Soleimani in Baghdad in January 2020 had changed history. And he posited that the US bombing runs against Iran’s nuclear sites last year took the threat of a bomb off the table.

The president has a point about the strategic impact of his previous Iran policy. But if he’d solved the problem already, why did he launch a new war?

And not for the first time, Trump seemed to lose his grip on his Iran narrative in a rambling news conference. Most bewilderingly, after previously demanding “unconditional surrender,” he implied that Tehran was justified in wanting to have a missile program like its regional rivals.

And he offered more comfort to Iran by saying he didn’t see the 60-day timeline as a “hard deadline.”

In another odd twist, Trump signed a copy of the MOU at the Palace of Versailles and sent a photo to the Iranians.

“It’s signed,” Trump said. “Signed it in Versailles, I just signed it.”

His theatrical flourish will only reinforce the sense he believes the optics of an agreement are at least as important as what is in it.

And it raises this question: What if the signed MOU doesn’t usher in the more intense diplomacy that everyone expects — but instead is seen by Trump as establishing a new status quo that allows him to take a one-way exit ramp out of his entire Iran misadventure?