It is now clear the United States is sinking into the quagmire of its war with Iran with no clear idea of how to get out. More than five months of intermittent bombing of Iran have not brought Tehran any closer to surrender. Recurring threats by US President Donald Trump to launch a massive military campaign against the country aren’t causing Iran to submit to US demands..

Meanwhile, diminished stocks of critical US weapons, plummeting approval ratings heading into the midterms and a looming global economic crisis due to increasing commodity shortages stemming from a closed Strait of Hormuz, are all putting political pressure on the US to end the conflict.

Given this situation, what options does President Trump have for ending the war?

From ‘Iran war’ to ‘Hormuz war’

When the Trump administration launched the war on Iran in late February, its stated reasons kept changing, but at least part of the rationale involved the threat of Iran’s nuclear programme. In previous negotiations, the US had insisted on no indigenous uranium enrichment for Iran and the surrender of its 440kg of highly enriched uranium. Iran had refused, and Trump ultimately decided to go to war.

After being attacked by the US and Israel, Iran moved swiftly to close the Strait of Hormuz by threatening maritime traffic passing through it. Although this response was expected – indeed, Iran had repeatedly threatened to do so in the build-up to the war – the US administration was caught off-guard and had no effective response.

Given the strait’s importance as a critical chokepoint for Middle East oil and refined products, the subsequent global economic consequences of a closed strait have been building up these last five months.

As such, the US administration’s priority is no longer getting Iran to capitulate on its nuclear programme but getting the strait open as soon as possible.

However, in trying to do that, it faces a problem. On the one hand, Iran has decided operational control of the strait is essential for its national security and a much-needed strategic deterrence to prevent future US-Israeli attacks. On the other, the US military cannot open the passage and keep it open.

Surprisingly, despite having a military budget more than 100 times the size of Iran’s, the US military is unable to prevent Iran from projecting enough military force to pose an enduring threat to maritime traffic through the strait.

Trump has repeatedly threatened apocalyptic carnage on Iran with the goal of inflicting enough pain on Iranian society to force its leaders to agree to US demands. Most recently, he threatened to expand US targets to include Iranian civilian energy installations. At a July 31 cabinet meeting, he told the media, “Well, we’ll be hitting them very hard and, you know, at some point they’re going to say, we just can’t take it anymore”.

A day later. he backed off, probably because he realised “hitting them hard” will not force Iran to submit.

Why? Because Iran’s new hardline Islamic Revolutionary Guards Corps (IRGC) leadership believes the US and Israel seek to eliminate the Islamic Republic. It feels any compromise in the face of US pressure only invites more pressure.

As such, US escalation is likely to cause not Iranian surrender but major retaliatory Iranian attacks on Gulf infrastructure. So unless the US is prepared to militarily “collapse” the regime by far more widespread bombing of critical civilian infrastructure than it has done heretofore, making Iran in effect a “failed -state”, future US use of military force won’t do the job.

The least bad option

When contemplating realistic options going forward, the most important fact to consider is that this US administration doesn’t believe in diplomacy with Iran – it never has. It believes in force, whether punitive tariffs and sanctions or punishing bombings. When it talks about “meaningful diplomacy” with Iran, it means “Iran accepting US demands”.

This US unwillingness to engage in serious, sustained diplomacy means that even if the US administration were to come to an agreement with Iran on the strait, it would likely be unable to continue on to a negotiated nuclear agreement that would put effective constraints on its nuclear programme.

The last nuclear negotiations took a total of five years (2010-2015), with two years of serious, intense negotiations (2013-2015). But this US administration is tired of this failed war and has other priorities, and so is likely unwilling to commit to any such process.

Given this US unwillingness and inability to actually engage in diplomacy to “solve the strait”, it should allow the process outlined in Article 5 of the Islamabad Memorandum of Understanding signed in June to play out: “The Islamic Republic of Iran will conduct dialogue with the Sultanate of Oman, to define the future administration and maritime services in the Strait of Hormuz, in discussions with other Persian Gulf Littoral States, in line with applicable international law and the sovereign rights of coastal states of the Strait of Hormuz”.

These Iran-Oman talks are ongoing and they are the best chance for a least-bad resolution of the problem. In this scenario, all the US administration has to do is provide input to Oman as needed and approve whatever final settlement the two sides reach. Any such agreement will likely include the US lifting of its naval blockade on Iranian ports, since Iran has linked this lifting to any reopening of the strait.

The outcome of these Iran-Oman talks is unknowable. But what is clear is that Oman and the rest of the members of the Gulf Cooperation Council are more adept and more motivated to negotiate with Iran than the US. There are significant differences between the two sides: the Gulf countries want a return to the pre-war status quo; Iran wants a “new normal”, where it controls maritime flow through the strait, perhaps in coordination with Oman.

Unfortunately, given Iran’s strategic leverage over the strait, it is likely that at least in the short term it will have its way, which might well entail “fees” collected by Iran on maritime traffic moving through the strait.

If any such deal over the strait is made, it would be fragile. Pre-war maritime traffic volumes would not return for a long time, if ever. US bases would remain in the region; US sanctions on Iran would remain in place. For its part, Iran would try to rebuild its defence industrial base to get ready for a next US-Israeli attack. And this is the likely best-case scenario.

Such is the likely legacy of a foolish war that brought not peace and stability but economic suffering, regional instability and a major loss of US prestige and power.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.