SHINZO ABE hoped this was a moment for diplomacy. His visit to Tehran this week, the first by a Japanese prime minister since the Islamic revolution in 1979, was meant to reduce tensions between America and Iran. After a meeting with Iran’s president, Hassan Rouhani, Mr Abe warned that the region could “accidentally” slip into conflict. And then, a few miles off Iran’s southern coast, came an illustration of how that might happen.

On June 13th two tankers in the Gulf of Oman sent distress calls after they had been damaged by large explosions. The Front Altair, flagged in the Marshall Islands and owned by Frontline, a Norwegian shipping company, was hauling a cargo of naphtha, an oil derivative, from Abu Dhabi; the Kokuka Courageous, registered in Panama and operated by the Japanese company Kokuka Sangyo, was laden with methanol. Both were bound for Asian ports. Photos from Iranian news agencies showed a fire burning on the starboard side of the Front Altair. The plume of black smoke overhead was thick enough to appear in satellite images. One-fifth of the world’s supply travels through the Strait of Hormuz, an important chokepoint for international shipping.

This is the second time in just over a month that tankers have been damaged in the Gulf. On May 12th four ships anchored off Fujairah, a port in the United Arab Emirates (UAE), had holes blown in their hulls. A preliminary investigation suggests that they were damaged by limpet mines. The latest explosions caused far more damage, forcing crews to evacuate both ships as they were underway. It will take weeks to probe what happened, amid reports of torpedoes being used. But the explosions do not seem accidental. The president of Kokuka Sangyo said the Kokuka Courageous vessel was “attacked” twice in a three-hour period.

Nor is it likely that two sets of explosions, weeks apart and in the same area, were mere coincidence. Though a UAE-led investigative team did not assign blame for last month’s sabotage, it said an unnamed “state actor” carried it out. America has blamed Iran for both sets of attacks. Iran, which is a regional rival of the UAE and Saudi Arabia, both American allies, has denied responsibility and hints that the latest explosions were orchestrated by its rivals. “Suspicious doesn’t begin to describe what likely transpired,” tweeted Iran’s foreign minister, Muhammad Javad Zarif, on June 13th.

Iran has in the past threatened to close the Strait of Hormuz if it were ever attacked. Some will see the strikes against ships in the area as a veiled warning of its readiness to make good on its threat. Messrs Zarif and Rouhani probably understand that attacking regional shipping would be to play with fire. But they do not call all of the shots in Iran. They are stuck in an internal battle with Iran’s ruling mullahs, who are more distrustful of the West, and their Revolutionary Guards, who back local forces in Syria and Yemen that have fought against Emirati- and Saudi-backed forces. Iran has a history of irregular warfare that allows it to maintain a measure of plausible deniability. In the 1980s it fought the so-called tanker war with Iraq. The conflict ravaged international shipping.

Tensions in the region have been rising since last spring, when Donald Trump withdrew from the deal, signed in 2015, that loosened sanctions on Iran in exchange for limits on its nuclear programme. Mr Trump reimposed sanctions and added new ones, in effect cutting Iran off from the global economy. After a year of abiding by the agreement, a bid to win European sympathy, Iran last month said it would begin enriching uranium in excess of the prescribed limits. Mr Rouhani warned that he would abrogate other provisions unless other signatories—Britain, France, Germany, Russia, China and the European Union—helped his country bypass American sanctions, which is unlikely to happen. Critics of Mr Trump’s approach have long warned that economic distress would lead Iran to lash out.

For the Arab states across the Gulf, these latest explosions fit into a troubling pattern. In May, two days after the Fujairah incident, two blasts in the centre of Saudi Arabia, 700km north of the Yemeni border, damaged an oil pipeline that carries crude across the kingdom. On June 12th a rocket hit the international airport in Abha, a Saudi city 200km from the Yemeni border, injuring 26 people. Both attacks were carried out by the Houthis, a Shia militia that controls large parts of Yemen and is fighting a Saudi-led coalition there. A United Nations panel of experts has said that Iran supplied weapons to the Houthis, including drones and missiles, though the group does not always act at Iran's behest.

But Saudi Arabia and its allies have tried not to escalate directly a conflict that would wreak havoc on their oil exports, and thus their economies. The UAE has been particularly circumspect in its public statements about last month’s sabotage (though in private officials evince little doubt about Iran’s involvement). If there is to be a response, they would like it to come from America. Mr Trump’s hawkish national security adviser, John Bolton, has long supported regime change in Iran, and even military action against it. But the president, as ever, is erratic, toggling between fiery threats and offers of dialogue. He is reported to have given Mr Abe a message to pass to Iran’s supreme leader, Ali Khamenei (who declined to reply). “We do not believe at all that the US is seeking genuine negotiations with Iran; because genuine negotiations would never come from a person like Trump,” said Ayatollah Khamenei.

Mr Trump has already bolstered America’s military presence in the region. Last month he rushed an aircraft-carrier strike group to the region. Those vessels have not transited the Strait of Hormuz, an effort to avoid further tension. They will probably step up their patrols; an American destroyer picked up some sailors from the stricken tankers (Iran says it rescued some too). The Pentagon is deploying an extra 1,500 troops to bases in Qatar, Bahrain and Iraq, and Mr Trump is invoking emergency powers to override congressional objections and sell weapons to Saudi Arabia and the UAE.

All sides insist they do not want war. But even if they are sincere, good intentions go only so far. The Gulf states (and their American protector) cannot tolerate threats to shipping. Mr Abe was right to push for diplomacy between America and Iran. But his visit, and the events that overshadowed it, underscore how difficult that will be.