Iranian-Israeli hostility is actually quite odd. Tehran is well over a thousand miles from Jerusalem. The two countries do not border each other. They have no major bilateral claims toward one another. Whereas large Arab neighbors of Iran, like Iraq or Saudi Arabia, might be considered its natural competitors, Israel cannot. Even fans of the “ancient hatreds” school of Middle East conflict would come up short.

What historical memory there is of Persian-Judaic interactions is largely positive in Jewish eyes: Streets in Israel are named for Cyrus the Great, who allowed the Jews to return to Judea from their Babilonian exile in 538 BCE. Conversely, Judea never rose to compete with Persia for regional prominence, as did Greek or later Arab forces.

All else being equal, then, we might have expected cool, uncomfortable relations—or more likely non-relations—between Israel and a large Muslim-majority country, not the foreign policy-defining struggle of present. Indeed, as is often noted, this hostility between the two modern states was not always there. It can be traced directly to one period, 40 years ago: the Iranian revolution and the birth of the Islamic Republic.

Friends become foes

From its inception in 1948, Israel dealt with an acute security challenge: It faced a massive, largely hostile region unified by a common religion and a common antipathy toward Israel. All four of its immediate neighbor states were Arab, as were the Palestinian Arabs, and they were backed by dozens of Arab and Muslim-majority states beyond them. Israel’s natural posture was therefore to try and find fissures among its potential foes. Early in the state’s existence, this took the form of the “periphery doctrine“: first Prime Minister David Ben Gurion’s attempt to forge an alliance with non-Arab (yet mostly Muslim) countries in the Middle East as a counter-balance to the Arab states. Chief among these non-Arab partners were Turkey and pre-revolution Iran, countries who had (then) a common orientation toward the West and their own reasons to feel isolated in the Middle East.

Israeli-Iranian cooperation included official relations—Israel had two successive ambassadors to Tehran—and robust trade in oil, a prime concern for Israel, then under a crippling Arab boycott. The basic logic was simple: My enemy’s enemy can be my friend, and Iran and Israel shared common Arab foes.

The revolution upended these relations dramatically. Not only were ties cut off, but Israel was relegated by Ayatollah Khomeini to the status of “Little Satan” (the “Great Satan” being the United States). For the new Iranian regime, Israel became a central focus of ideological, religion-infused vitriol. The Islamic Republic became a central backer of any (mostly Arab) “resistance” to Israel. Iran seemingly became more Palestinian than the Palestinians. It opposed all peace negotiations between Arabs and Israelis, including the Palestine Liberation Organization’s (PLO) Oslo Accords of 1993.

Iran seemingly became more Palestinian than the Palestinians.

A street in Tehran was named for the assassin of Egyptian President Anwar Sadat, who first signed peace with Israel (the street was renamed “intifada” street in 2004 in an effort to improve relations with Egypt). Iran fostered the creation of the Lebanese Hezbollah, Israel’s most menacing guerilla adversary of recent years. It backed Sunni Islamist Palestinian groups, in particular the Palestinian Islamic Jihad (PIJ) and, at times, Hamas. In its fight against Israel, a seemingly endless tit-for-tat, even non-Israeli Jews were not safe. Most notably, Argentinean prosecutors, and several intelligence agencies, have accused Iran of direct involvement in the murder of 85 people in a suicide bombing of the Jewish Community Center in Buenos Aires in 1994.

The threat intensifies

Israel’s approach to the Islamic Republic has been uneven. Despite the Iranian rhetoric, Israel did not see it, at first, as the implacable enemy of today. For much of the first decade of the Islamic Republic, it was engaged in a brutal war with another of Israel’s sworn enemies, Saddam Hussein’s Iraq. (“I wish both sides success” was the rather gruesome way Israeli Prime Minister Menachem Begin put it.) Israel was a key player in the Iran-Contra affair, and the possibility that some in the Iranian regime might change their attitude toward Israel remained an option. By the 1990s, however, as Hezbollah grew in strength and the first signs of an Iranian nuclear program started emerging, Israelis became increasingly more concerned and increasingly active in their diplomatic efforts and covert operations against Iran.

Ideological considerations, anger over Israel’s ties to the Shah, sympathy toward the Palestinians, and a generalized and foundational antipathy toward the West were all important elements of the about-face, but there were obvious structural advantages to this position as well. Israel is a useful enemy for the Islamic Republic. It is not merely a diversion from domestic woes, as it has been to many Middle Eastern regimes, but it is also part of an Iranian attempt to play in Middle Eastern affairs. For a large, Muslim-majority, non-Arab state committed in exporting its revolution to Arab countries, it is essential that the main fault lines in regional affairs not be national—Arab-Persian—but rather religious: Muslim-non-Muslim. For the major Shiite power, the minority Muslim strand, it is again important to draw the line not among and between streams of Islam, as many Sunnis do, but between Muslims and others, and there is no better “other” in the Middle East than Israel.

By carrying the mantle of unwavering resistance to Israel (and the United States) Iran can, in theory, appeal to solidarity with most Arabs. Moreover, engaging in the Palestinian cause allows Iran to expose hypocrisy and duplicity in the Arab states’ positions, whenever their commitment to the cause is tempered by pragmatic impulses.

Today no country embodies threat to Israelis as does the Islamic Republic.

The result is that today no country embodies threat to Israelis as does the Islamic Republic. Iran’s nuclear program appears to most Israelis to be an existential threat. The nuclear question and Iran’s extensive proxy operations in the Arab world have shaped Israel’s foreign policy in recent years and driven much of its actions on the global stage. Iran has become a near-singular focus of Israeli leaders and planners, identifying Iran’s hand in nearly every direction, and often with cause.

Is Iran a useful enemy to Israeli leaders as Israel is to Iranian ones? Like all politicians, Israeli leaders do appeal at times to foreign threats to divert attention from domestic affairs, and Iran has easily filled that need. Yet when it comes to Iran, unlike Palestinian affairs, the spectrum of opinions in Israel is quite narrow—there are very few Israelis, from across the political map, who do not see the Islamic Republic’s activity as a grave threat, whether they adopt the existential-threat rhetoric or not. There are very few Iran-doves in Israel, even if Israelis debate the means for confronting the threat.

New alliances, entrenched hostilities

As a result of the major shift in Israeli-Iranian relations, Israel today has a reverse periphery doctrine. It has strived and has had remarkable success in forging an alignment of sorts with major Arab countries—not only Egypt and Jordan, who have official peace with Israel, but even cooperation with the Gulf: Saudi Arabia, the U.A.E, Oman. These relations are far less developed or overt than the relations Israel had with the Shah’s Iran. They are limited in scope and entail no embassies. Yet the logic is the same as it was in the 1950s, but in reverse: My enemy’s enemy can be my friend and these Arab states and Israel share a common overriding foe—Iran. (They also share a common, though far less severe, hostility toward Recep Tayyip Erdoğan’s Turkey, Israel’s other main “peripheral” partner of old.)

The reverse periphery doctrine has been a boon to Israel in important ways. It now finds itself in one camp with major Arab players, limiting the short-term damage of the continued Israeli-Palestinian conflict (though not alleviating, and perhaps worsening, its long-term consequences) and allowing Israel to engage with world powers from a position of regional strength. Related Content Order from Chaos Watch: Experts look back on Iran’s 1979 revolution and the US response Order from Chaos Iran’s revolution and the problem of autocratic allies Order from Chaos What Iran’s revolution looked like from inside the shah’s palace

The benefits come with a very heavy price, however. The Iranians have proven themselves to be formidable foes. Israeli planners often express grudging respect for their Iranian enemies—a respect they, frankly, don’t always exhibit toward their Arab adversaries, with the possible exception of Iranian-backed Hezbollah. The Iranian Quds Force and its commander, Qassem Soleimani, have exhibited tenacious opportunism, going after any opening they can find to advance, and disengaging temporarily when they cannot. Israeli successes against Iranian forces in Syria have come with the knowledge that Iran will strike back. The Iranians have also shown an ability to create long-term threats to Israel and the patience to see them through, as with the creation, cultivation, and armament of Hezbollah. Iran as an enemy may help unite part of the Middle East, but it is not necessarily the enemy you want.

Moreover, an important byproduct of, among other things, the decades of Iranian activity on the Israeli-Palestinian issue, is its gradual transformation from a national conflict to a religious one. Iran’s interest in casting the struggle as an Islamic, not an Arab, one, is only one factor in this transformation, but organizations supported by Iran had a dramatic impact on the prospects of Israeli-Palestinian peace. Hamas and PIJ’s efforts to derail the Oslo process in the 1990s were a key factor in their failure. The rise of Hamas more generally—largely independent of Iran, but with its intermittent support—eventually led to the bifurcation of the Palestinian territories between the West Bank and the Gaza Strip. For decades, Israel feared Arab nationalism—Gamal Abdel Nasser, Saddam Hussein, the PLO—but like many others, it underappreciated the menace of religiously-inspired conflict, with Iran or with Sunni Islamist parties. Religious conflict in any form is often far more impervious to pragmatic solutions, and can prove more dangerous than national conflicts.

The last 40 years have produced deep hostilities between Israel and Iran. That these have instrumental aspects does not make them any less severe or real, as the damage wrought by hostilities in Lebanon, Israel, Gaza, and elsewhere makes clear. Still, it is instructive to view the ways by which structural and instrumental considerations can shape conflict. Past is not necessarily prologue, but the warm relations Israel enjoyed with Iran under the Shah indicate that the present levels of hostility are not inevitable. Forty years ago, a domestic revolution in Iran transformed the Middle East as far as the Mediterranean. Domestic change in Iran could transform it again.