Despite the potential for serious escalation after the US killed Iran's top military commander Qasem Soleimani last Friday -- and Iran retaliated Tuesday with strikes on Iraqi air base hosting US and Iraq forces -- both Iran and the US have dodged a very dangerous bullet.

In fact, watching Tuesday night's Iran crisis play out, I was reminded of the joke about the guy who jumps off a 10-story building. As he's passing the 5th floor, someone yells out: "How ya doing?" "So far, so good," he replies.

But crisis averted does not mean America is on a glide path to a better relationship with Tehran. President Donald Trump's speech to the nation Wednesday morning -- confident, self-congratulatory and even triumphal in tone -- presented a dangerous misreading of both the US's leverage and Iran's continued capacity for trouble-making.

Aaron David Miller
Aaron David Miller is a senior fellow at the Carnegie Endowment for International Peace, focusing on U.S. foreign policy.
More >

It's by no means clear that either country is willing or able to negotiate or even engage seriously with the another, though that's precisely what's needed.

Still, that both have avoided a serious escalation, for a variety of reasons, is remarkable. The targeted killing of Soleimani was a bold and even reckless move -- seemingly untethered from any broader strategy -- certain to complicate US relations with Iraq and make Americans in the region less, not more, secure.

Indeed, despite Trump's threats to hit back at retaliation, Iran broke precedent by responding openly from inside Iran, launching ballistic missiles against US forces in Iraq. Fortunately there were no American casualties. But it is still unclear whether Iranian strikes were designed to target Americans.

In a strange way, both Donald Trump and Iranian Supreme Leader Ayatollah Ali Khamenei have something in common: they both want to hang on to power; and a major war between Iran and the US is not good politics for either one.

It would be foolish to assume that the Soleimani file is now closed from Iran's point of view; and that Tehran, cowed by the US, will -- as Trump indicated-- stand down.

Iran's ballistic missile program -- the capacity of which it demonstrated -- will continue. It will ramp up production of enrichment even while it allows International Atomic Energy Agency inspectors in; and it will continue its efforts to spread its influence in the region.

Iraq will be a primary arena. Iran will continue to press the government of Iraq to push for US withdrawal. And even if it doesn't succeed, US-Iraq cooperation, especially in the fight against ISIS, will be constrained; the Popular Mobilization Forces -- Iraq Shia units, many of which are close to Iran -- may yet want to retaliate for the US killing of their leader Abu Mahdi al-Muhandis, who died along with Soleimani.

Iran is in no hurry. But it's clear that from the perspective of the Supreme Leader that the US and Iran are now more than ever in a confrontational mode.

It is very good sign that President Trump, despite his public bluster, did not choose to retaliate for the Iranian missile attacks. But we should not conflate that restraint with any fundamental change in the Trump administration's Iran policy or an easing of the maximum pressure campaign: in his speech, Trump promised more sanctions.

And though the President used boilerplate language about Iran being a great nation and wanting peace and a replacement nuclear deal, there's little reason to believe he or his administration will be proactive.

The US and Iran need a "deconfliction" channel and maybe a discreet one could be arranged. But the anger and bitterness on the part of Iran, and the Supreme Leader's profound mistrust of Donald Trump, as well as the yawning gaps between Tehran and Washington on everything from ballistic missiles to Iran's regional role, make meaningful progress hard to imagine.

Instead, we are likely to see a return to the grim competitive relationship that has marked US-Iranian ties for decades now. Both will want to avoid a major confrontation. But both will also see their status in the world as a zero-sum game where one side's loss is the other's gain.

With legislative elections looming in February, the Iranian attitude toward the US can only harden.

If we're lucky, there will be no catastrophic confrontation. and the US-Iranian relationship will fall somewhere in between a war nobody wants and a peace that's out of the question.

This article was originally published by CNN.