President Donald Trump struck exactly the right balance on Thursday when he hinted at possible retaliation against Iran for shooting down a U.S. drone in international airspace, but then said he believed the attack was an accident.

Trump first tweeted, “Iran made a very big mistake!” Later, during a meeting with Canadian Prime Minister Justin Trudeau, he said, “I find it hard to believe it was intentional.”

Both are possible readings of the word “mistake.”

The first response put Iran on notice that Trump might strike back, and would not allow unprovoked aggression to stand. The second response signaled to Iran that Trump will not be provoked into a military response before he is ready, both diplomatically and politically.

Later, it emerged — likely through a deliberate leak by the administration — that Trump had ordered air and naval strikes against Iran, and then canceled them. He confirmed Friday morning: “We were cocked & loaded to retaliate last night on 3 different sights [sic] when I asked, how many will die. 150 people, sir, was the answer from a General. 10 minutes before the strike I stopped it.” He said the response would have been “disproportionate” for a downed drone.

The president not only portrayed himself as concerned for enemy lives, but signaled to Iran just how close he had come to pulling the trigger.

He threatened the regime while avoiding the trap Iran likely wished to set: a U.S. military response that would be met with both domestic and international condemnation, preventing Trump from taking further action.

Trump’s response echoes that of President John F. Kennedy during the Cuban missile crisis. Faced with two messages from Soviet premier Nikita Kruschev — one conciliatory on Friday, one aggressive on Saturday — Kennedy chose to respond to the first and ignore the second.

Likewise, when the Soviet Union shot down a U-2 spy plane in the midst of the crisis, Kennedy chose to conclude that Kruschev had not ordered the strike himself (a decision echoed in Trump’s decision to consider the attack on the drone an accident). And when the USSR violated the blockade the U.S. had set up around Cuba, which Kennedy had called a “quarantine” to avoid committing an act of war, he let the first ship, the Bucharest, though because it had no weapons. He created a deterrent while also preserving tactical flexibility to avoid being provoked into making the first move.

It seems difficult to believe that Trump thinks Iran shot down the drone by accident — but that pretense, like Kennedy’s “quarantine,” is a useful fiction.

Trump’s flexibility has given him leverage over Iran in this situation — and with sanctions continuing to undermine the Iranian economy, and to disrupt Iran’s payments to its terrorist proxies, time is not on the regime’s side.

Democrats are shrieking that this is the inevitable consequence of Trump’s pullout from the Iran deal last year. If so, that is entirely to the Trump administration’s credit.

The Iran deal did not prevent war. On the contrary, it gave Iran a path to a nuclear weapon and rewarded its aggressive behavior.

Obama left the Iranian regime’s vast international operations untouched; indeed, the Obama administration dismantled the law enforcement infrastructure that kept Iran’s terror in check. The deal also allowed Iran to continue developing ballistic missiles, and threatening our allies.

Trump does not need to go to war. Rather, the best way of avoiding war is to do exactly what he is doing: laying out the case against Iranian efforts to sabotage international shipping; pressuring our European allies to stop helping Iran evade sanctions; and moving additional military resources into the Persian Gulf so that any Iranian aggression will be met with a swift and overwhelming response.

Iran can keep stalling, hoping that Europe will save it, or that a Democrat will replace Trump in 2021. But its economy may not hold out until then, and its attacks on tankers in the Gulf of Oman alienated much of Europe. The time is coming when the regime must accept a more stringent nuclear deal, or collapse. If it tries more aggressive military tactics, Trump will be seen as having no choice but to respond.

Both approaches are very risky, and becoming riskier, for Iran. Meanwhile, Trump’s immediate task is to build up support, foreign and domestic, for action against Iran. He has already begun, answering doubts by releasing surveillance photos of the Iranian Revolutionary Guard Corps removing a limpet mine from a ship.

By the time war comes, if it comes, it ought to be clear that Iran is entirely to blame.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.

This post has been updated to include a reference to the U-2 incident.