Shinzo Abe’s trip to Tehran this week turned out to be one of the more ill-fated mediation efforts of recent times.

What was billed as a grand gesture – the first Japanese leader to visit Iran in four decades – ended in humiliation, with split-screen television pictures showing Abe being told off by a stern supreme leader, while a thick plume of smoke rose from a burning Japanese tanker in the Gulf of Oman.

The US has blamed Iran for Thursday’s attack on two petrochemical tankers and has distributed grainy black and white images purporting to show Iranian sailors removing a limpet mine from the side of the Japanese tanker.

The footage has produced more questions than answers. Is the removal of the unexploded mine supposed to show an effort to hide evidence? The Pentagon is not saying.

If this was an effort by Iranian hardliners to torpedo peace talks, why was it not timed to disrupt Abe’s meeting the day before with the Iranian president, Hassan Rouhani (the hardliners’ principal target), rather than their patron, the supreme leader, Ayatollah Ali Khamenei?

Even without the visible symbolism of burning oil, Khamenei’s response to Abe’s mission could hardly have been more dismissive. He tossed aside the polite pretense that the Japanese prime minister had come on his own initiative, inviting the television cameras into his office to explain, in the bluntest of terms while Abe looked on helplessly, that the Japanese visitor had come bearing a message from Donald Trump, and was wasting his time.

To add inevitable insult to injury, the US president then swiftly disowned Abe and his mission, portraying him in a tweet as well-meaning but naive, and declaring the time was not right for negotiations.

Shinzo Abe with Iran’s president, Hassan Rouhani, in Tehran, Iran, on 12 June. Photograph: Abedin Taherkenareh/EPA

Abe is certainly not the first nor will he be the last foreign leader to regret trying to do Trump a favour. But he must have known he was taking a substantial risk by inserting himself in the chaos of US foreign policymaking.

By all accounts, Abe was carrying a message with Trump’s approval, conveying the US president’s seriousness about talks. But the offer contained no sweeteners, no pause in the campaign of “maximum pressure”. In fact, less than a week before Abe’s peace errand, the US piled on a new level of sanctions, aimed at the petrochemical industry. The Japanese mission was doomed before it started.

It is evident Trump got onboard the maximum pressure train because he thought it would take him to the same destination as its North Korean equivalent – a glamorous summit and another “deal of the century”, the details of which would be of secondary importance to the statesmanlike atmospheric.

This has always been the Trump’s template for doing business: squeeze the other side by every means available until he or she comes begging to the table. The first summit with Kim Jong-un in Singapore seems to have only deepened Trump’s conviction that this method worked.

His self-belief as the master of the deal has made him oblivious to all the signs that it had been Kim’s intention all along to pivot to diplomacy once a basic nuclear arsenal had been completed. It also made Trump blind to the fact that Kim gave nothing away in Singapore. Trump is now hostage to his relationship with Kim, pointing to the “beautiful” letters he still receives from the 35-year-old North Korean leader as a distraction from the complete absence of disarmament.

Beautiful letters were never going to cut it with Khamenei. While a summit with a US president represented a historic victory for Kim, it would be unthinkable for the supreme leader, and politically impossible under current circumstances for Rouhani.

The Iranians, too, have miscalculated. In the wake of US abrogation of the 2015 nuclear deal with Tehran, and its attempt to pressure the rest of the world to follow suit, Iran expected China and at least a few of their other oil customers to defy the US oil embargo. That has not happened so far. Rouhani met Xi Jinping in Kyrgyzstan on Friday to get a clear idea of Chinese intentions, but Xi seems to have remained non-committal.

Meanwhile, the European mechanism that was supposed to insulate the trade in basic humanitarian supplies from US sanctions has yet to get off the ground – and may never fly.

Faced with economic strangulation, Tehran has less and less to lose. Whether it was behind the tanker attacks or not, it had signalled its intention to make the rest of the world pay some of the price for US brinksmanship. The message from Iranian officials over the past two months has been that, if Iran could not export its oil through the Gulf, nor should other nations.

Tehran has also slapped down a nuclear ultimatum. If sanctions pressures are not significantly eased by 8 July, it will throw off some of the shackles of the 2015 nuclear deal, most importantly by raising the level at which it enriches uranium. That will ring alarm bells around the world, by cutting the time Iran would need to make a bomb.

Trump now appears to realise that the train he boarded is not heading to a glorious summit, but a potentially devastating conflict in the Gulf, and that some of his own officials, notably the national security adviser, John Bolton, are quite content – enthusiastic, even – to keep driving in that direction. Trump wants to get off and make a deal, but the Abe mission suggests he has no idea how to.

Iran, meanwhile, has found its strongest point of leverage – Trump’s fears about his chances of re-election against the backdrop of a new war in the Middle East. To play on those fears is a gamble with very high risks. Every cycle of escalation brings the region closer to a point where the slide towards war goes beyond anyone’s control.