An economic blockade led by US ally Saudi Arabia backfired spectacularly as Qatar announced it had reopened full diplomatic ties with Iran last week.
Qatar has been effectively under siege since early June by neighbouring Gulf states seeking to force it to cut ties with Iran.
Instead they have pushed Qatar further into the arms of Iran.
Saudi Arabia’s rulers are worried that Iran is gaining influence in the Middle East. The two states are major regional powers and bitter rivals.
They back opposing sides in the bloody war in Yemen, which has killed more than 10,000 people since it began in 2015.
A Saudi airstrike in Yemen killed at least 14 people—including children—on Friday of last week.
But Saudi Arabia and its allies haven’t been able to defeat the Houthi rebels, backed by Iran, who control parts of Yemen.
Saudi Arabia and the US are worried that Iran will come out strongest from wars in Iraq and Syria.
Iran aims to control a corridor of land through Iraq and Syria to the Mediterranean, where it can set up military bases.
This would challenge the regional dominance of US-backed Saudi Arabia and Israel.
In Syria, forces backed by Iran—including its own Iranian Revolutionary Guards Corp, the Syrian Army, Lebanese group Hezbollah and various militias—are gaining ground.
Iranian-backed militias in Iraq—where Iran already has strong political and economic ties—also control areas of land close to the Syrian border.
Saudi Arabia has tried to increase its influence in Iraq in response. The two states announced a deal earlier this month to reopen their shared border, closed after the Iraqi invasion of Kuwait 27 years ago.
A referendum on independence set for 25 September could see Iraq’s Kurdish region try to break away. This is opposed by Iran, Iraq and Turkey, which all have Kurdish regions.
Meanwhile Saudi Arabia’s regional allies, Egypt and the United Arab Emirates, are looking to impose a new government in the Palestinian Gaza Strip.
The two countries have sent aid to Gaza’s government, led by resistance group Hamas which has been supported by Iran. In return Hamas could sign a deal that puts UAE-backed Palestinian exile Mohammed Dahlan at the head of Gaza’s government.
This would draw Hamas closer to Egypt and the UAE.
But it could lead to fresh conflict between Palestinian Authority president Mahmoud Abbas in the West Bank and his rivals Hamas and Dahlan.
The jostling between rival powers could lead to even more turmoil in the Middle East.