Donald Trump’s remarks on foreign policy resemble a dot-to-dot designed by an abstract artist – individual points may stand out, and there are discernible lines between some of them, but to look for a coherent whole is a fool’s errand. His reaction to the attack on Saudi Arabian oil facilities a the weekend swung quickly from a warning that the US is “locked and loaded” to the remark that “I don’t want war with anybody” and that “at some point it will work out”. Though his secretary of state blamed Iran point blank, the president has said Washington wants more proof. He has already backed off one planned strike, in June.

Yet he could still swing in another direction. While his keenness to avoid getting embroiled in a conflict is evident, especially with his campaign for a second term well under way, he is a volatile and ignorant man in a chaotic and fractious administration, facing a crisis in which the stakes rise by the month. The assault on the Abqaiq petroleum processing plant, whether by drone or missile, which knocked out half the kingdom’s production and caused the biggest spike in oil prices since Saddam Hussein invaded Kuwait three decades ago, has greatly increased the risks of war.

Iran insists it is not responsible, and the Houthi rebels it backs against the Saudi-led coalition in the devastating war in Yemen have claimed it as their triumph. No party to this situation can be regarded as a candid witness. But even if the Houthis carried it out, no one believes they would have been able to pull off such a sophisticated attack without the Iranian support they have received.

Mr Trump’s early tweet implied that he was outsourcing US foreign policy to Riyadh – which was initially more cautious about attributing blame to Iran than Mike Pompeo, despite the bellicose character of its crown prince. Plausible deniability can be useful to targets as well as perpetrators, particularly when they have limited options for responding. Without retaliation, Riyadh fears further attacks, and the ruination of the long-awaited flotation of the state oil company Aramco, on which the crown prince’s ambitious plans to overhaul the Saudi economy depend. But it understands that there are not many ways of doing so without risking a conflagration. Even if a potential measured response was identified – perhaps a cyber-attack on Iranian facilities, for which no one claims responsibility – it would be harder to effect when Mr Trump sees discretion as an absurdity and demands personal glory at every turn.

Iran looks alarmingly confident that he will shy away from military action even as the stakes rise, and has been keen to demonstrate that its people will not be the only ones to suffer thanks to the US stranglehold on its economy. Maximum pressure was supposed to bring it to heel; instead, it has increased Iran’s aggression, because it has so little left to lose. Strikingly, the United Arab Emirates has stepped back somewhat from the confrontation with Iran following attacks on ships leaving its ports. Meanwhile, Europe, led by France, has increased its attempts to de-escalate. Yet that initiative can only succeed if the US is willing to bring Iran back to the table by loosening the economic chokehold. The scale and effectiveness of the weekend’s attack has made that less likely in the short term at least – and lessened the prospect of a post-Trump president returning to the 2015 Iran nuclear deal or agreeing to a similar one.

Mr Trump complained that the agreement focused on Iran’s nuclear programme but did not address its missile development, human rights abuses and sponsorship of militias. Even were his claims taken at face value, which they should not be, the point is that the nuclear deal was achievable and important in its own right. Walking out of it has made it harder to deal with every other matter. The region risks stumbling into war – as these latest events have so clearly shown.