As Iran heads into an election on Friday with the focus on the economy, it is easy to miss the rise in temperature in Iran’s regional security environment. In late April, nine Iranian border guards were killed in Sistan-Baluchistan province as the result of an attack launched from Pakistani soil by the Sunni Islamist Jaysh al-Adl. Tehran sent a strongly worded letter and followed up by a visit from the Iranian foreign minister with a delegation to Islamabad to discuss closer border cooperation. This seemed to calm the situation however, the head of Iran’s armed forces Muhammed Bagheri has also said that Iran reserved the right to hit terrorist bases ‘wherever they are’, and made an unsubstantiated claim that that Saudi Arabia and Washington were assisting terrorist groups along the Iran-Pakistan border. This follows on from Pakistan’s acceptance of the offer for a retired general to head the Saudi-funded Islamic Alliance of Muslim countries allied against terrorism. Given that neither Shi‘a Iran, nor Shi‘a-majority Iraq were invited to be part of the Islamic Alliance, the sensitivities are clear.

Meanwhile, across the Persian Gulf, Iran's war of words with Saudi Arabia has started up again with the deputy Crown Prince and Defence Minister Muhammad bin Salman telling an interviewer that dialogue with Iran is impossible and that Saudi Arabia was a prime target of Iran. He said   Riyadh wouldn’t wait for the battle to be in Saudi but would work to ensure the battle was in Iran. The Iranian Defence Minister hit back quickly via an interview with Lebanese TV in which he warned Saudi Arabia that if it initiated anything, all that would be left of Saudi would be the two holy sites (Mecca and Medina).

Washington for its part has repeatedly signalled to Tehran that the days of the Obama détente are a thing of the past. Secretary of State Tillerson last month accused Iran of being the world’s largest state sponsor of terrorism, which was pretty well exactly what Secretary of Defence Mattis had said the previous month.  Washington’s UN ambassador Nikki Haley has referred to Iran as the chief cause of conflict in the Middle East today. And to top it all off, President Trump’s first overseas visit will include trips to Saudi Arabia and Israel, two of Tehran’s staunchest opponents. Riyadh is of course delighted (as are US defence companies who hope to reap some of the $US100 billion in arms deals with Saudi Arabia that are rumoured to be announced during Trump’s visit) that normal service has been resumed after Obama’s values-based relationship determinant is a thing of the past. This rather fawning open letter to President Trump that appeared in a Saudi newspaper recently is illustrative of the new feeling of optimism alive in Riyadh.

Although the Iranian president has relatively little say over external security policy in the Islamic Republic, whoever wins the election on Friday - or the runoff if required a week later - will face an external security environment that is looking increasingly bleak.  And when you are already decisively engaged in Syria and Iraq, the fact that the environment is becoming more threatening certainly says something about the potential size of the problem.