An incoming prime minister could be forgiven for feeling that the fates have been a touch unkind. As well as no majority in parliament, an uncertain domestic agenda and the vortex of Brexit, now a fully formed international crisis sits in the in-tray marked “Iran”. It will be an early test of diplomatic dexterity.

We should not be here. As always, it helps to see the world as others see it, without compromise or acceptance of another’s perceptions. Iran has long and complex relationships all round. A Shia state surrounded by Sunni states, it sees its history as one requiring constant vigilance to survive in a world that stood by when it was attacked by Iraq and lost perhaps up to a million people, and one where economic sanctions threaten its people and government stability.

It is not the first state to believe that its chance of survival is enhanced if it fights or stations weaponry outside its borders, with proxies or compliant partners. It is also not the first to fail to grasp that such actions won’t be seen as defensive by others, not least when accompanied by revolutionary religious and secular fervour that seeks to undermine Arab neighbours, or the voicing of existential threats to Israel.

Much mutual suspicion was channelled into the agreement that curbed Iran’s overreach on nuclear weapons appropriation, the Joint Comprehensive Plan of Action (JCPOA), notably described by those close to it as not built on trust, but on mistrust, which is why it was so detailed on the nuclear elements.

But it was also an agreement built on valuable relationships, which my experiences in Tehran suggest should not be underestimated at critical times. The abandonment of the JCPOA by a US unwilling to accept a lack of progress on other matters has triggered a series of responses. The US has resorted to “maximum pressure”, ever more punitive economic sanctions.

This is not going to work in the short or medium term. Iran has hunkered down before. But Iran does not respond passively. If one side, the US, is in breach of an agreement, it regards it as only just, indeed domestically imperative, to respond in kind.

However, the Iranian response is worth examining. It was not immediate, giving over a year’s warning before exceeding enriched uranium production, and it was not excessive, deliberately just a small, non-threatening amount over the top, thus not offering an excuse for significant action against it.

Recent history suggests that no one wins a conventional war between states in the region

The worry is that crises escalate and mistakes occur. Iran is responding to the economic pressure, particularly the ban on oil sales, by reminding the world of Gulf vulnerability. Tit-for-tat moves on shipping will sooner or later lead to a fatal confrontation – we would be wise to work with others on an escort system, not to exacerbate, but reduce the risk by preventing more seizures. These events give credibility to those calling for an increase in defence spending, particularly on smart deterrents.

Everyone in the region says they don’t want war. Nor should they. Recent history suggests that no one “wins” a conventional war between states in the region, so it’s no wonder that neighbouring states are extremely anxious about where things are going. If weapons begin flying it will be Arab states and Iran that will be devastated – first.

Gulf states are more aware than US hawks that Iran is going nowhere and, sooner or later, talks involving them, from shared environmental risks to maritime security, might replace the stepping stone to the progress lost in the JCPOA wash. No one can allow threats to shipping, and nor can threats to others from Iran be ignored. Iran must always understand that. But the advice of wise heads, on all sides, of those who negotiated in the recent past, when the nuclear stakes made the risk even higher than today, should be sought and heeded as talking, through back channels, must start again.

As we leave the EU, a new prime minister’s position on the relationship with the US will be watched carefully, the implications being obvious. If not already expert in the region, the new incumbent will need to immerse himself fully, and burn long hours, so he knows and understands what’s behind the 3am call he will in due course be receiving.

Alistair Burt is a former minister of state for the Middle East