For much of this year, two beliefs have held firm in the halls of power in Iran: US attempts to strangle its economy cannot be tolerated and Donald Trump has no intention of going to war.

Far from wilting under the barrel of a global superpower’s guns, Iran’s leaders have signalled an intent to defend their interests, by damaging those of their foes. Iran’s anger at the US, and its alleged role in the attacks on six tankers in Gulf waters over the past five weeks did not emerge from a vacuum. US-imposed sanctions have taken a huge toll on its economy, and diminished its ability to service long-lasting commitments across the region – in Syria and Lebanon, in particular.

Tehran’s access to oil markets has been crippled by a sanctions regime that has proven more targeted and comprehensive than ever before. At the same time, enemies across the Gulf are selling oil to its former customers. To leave either unaddressed would be to signal weakness, say regional officials familiar with Iranian leadership.

An oil tanker is seen after it was attacked at the Gulf of Oman, in waters between Gulf Arab states and Iran. Photograph: Reuters

What to do about it has been the subject of intense debate in Tehran and discussion with proxies, including Hezbollah in Lebanon – long the apex of Iran’s foreign policy projection. As has how to square away Trump’s oscillating public stances; hours after tweeting on Friday that neither side was ready for a deal, the US leader said: “We want to get them back to the table”.

The shifting views are likely to further support a view in Iran that Trump is far from the shrewd negotiator he seems – to himself – to be. More carpet-seller than Kissinger, he seems unaware of Iran’s leverage, in regard to its dormant nuclear programme, ignorant of its culture and unsure on his feet as tensions between both sides escalate.

There is next to zero chance of a Kim Jong-un style showboating summit between Trump and Iran’s supreme leader, Ali Khamenei, and every chance that even in the highly unlikely event such a meeting did take place he would walk away with less than he did in Singapore.

Iranian officials have told confidantes in Iraq that they view Trump as the epitome of US shortcomings; a leader with neither the patience or perspective to allow for deals to be made. Tehran has indicated that if sanctions relief isn’t forthcoming by 8 July, it will no longer abide by key parts of the nuclear deal – including sticking to bans on uranium enrichment. No longer would its nuclear programme be verifiable – winding back all of the achievements of Barack Obama’s signature policy.

Iran’s gains in the region in the past 16 years have been profound – a fact largely attributable to US misadventures, the most prominent of which was to hand over the centre of the Arab world to Iran’s influence. Despite a price tag that easily surpasses a trillion dollars, there is barely a sign that “liberated” Iraq even wants a strategic relationship with Washington.

While undoubtedly under stress from sanctions, Tehran still has cards to play, and leaders who know how to hold a hand. Its gamble is that Trump doesn’t know who he’s dealing with, or whose rules he’s playing by.