Israel considers Iran an “existential threat” but the two countries were once long-time allies under the shah.

With Prime Minister Benjamin Netanyahu accusing Tehran of an attack on an Israeli-owned ship in the Gulf of Oman, here is a recap of their volatile relations over the past half century.

Special relationship

Since its creation in 1948, Israel has close ties with Iran, which becomes the second Muslim country to recognise the Jewish state after Turkey.

They become allies under the shah, Mohammad Reza Pahlavi. At the time, Iran is home to the biggest Jewish community in the Middle East.

The new state imports 40 percent of its oil from Iran in exchange for weapons, technology and agricultural produce.

Israel’s Mossad also helps train the shah’s feared Savak secret police.

Islamic revolution

The 1979 revolution in Iran topples the shah, dramatically ending the friendship between the states. Israel does not recognise the new Islamic Republic.

The ayatollahs consider Israel illegal occupiers of Jerusalem and responsible for the “genocide” of Palestinians. Informal commercial links remain in place, however.

Islamic Jihad becomes the first Islamist Palestinian organisation to take up arms against Israel in 1980, with Iran as its main backer.

Nonetheless, Israel sends Tehran around 1,500 missiles to help it fight Saddam Hussein during the Iran-Iraq war that rages from 1980 to 1988.

Hezbollah created

Israel invades the Lebanese capital Beirut to counter Palestinian groups based there in 1982.

Iran’s elite Islamic Revolutionary Guard Corps subsequently back the creation of militant group Hezbollah, which wages a campaign against Israeli forces from the Shiite strongholds of southern Lebanon.

Israel blames Hezbollah for attacks abroad, including in Argentina, where the 1992 bombing of the Israeli embassy kills 29 people and a 1994 attack on a Jewish community centre leaves 85 dead.

‘Wiped off the map’

Iran says it has successfully tested Shahab-3 missiles capable of reaching the Jewish state in 1998, alarming Israel, which fears its enemy is developing a nuclear capacity.

Iran’s new hardline president Mahmoud Ahmadinejad says in 2005 that Israel is doomed to be “wiped off the map” and that the Holocaust was a “myth”.

The sentiments echo those of Iran’s supreme leader Ayatollah Ali Khamenei, who refers to Israel as a “cancerous tumour” to be cut from the Middle East.

When Iran resumes uranium enrichment at Isfahan the same year, Israel calls on the International Atomic Energy Agency (IAEA) and the UN to prevent it acquiring nuclear weapons.

When the Iran nuclear deal is brokered by world powers in 2015, Netanyahu slams it as an “historic mistake”.