Thirty-three years after he left the Mossad, Israel’s external intelligence arm, one memory sometimes wakes Yossi Alpher at four in the morning. What if Mossad had agreed to a request in early 1979 to kill Ayatollah Ruhollah Khomeini, then still in exile near Paris?

“It’s impossible to answer,” Alpher said in an interview. “But there is a case to be made for the centrality of very charismatic leaders, and so for the consequences of their disappearance.”

Alpher relates the bare bones of incident in his recent book Periphery: Israel’s Search for Middle East Allies. He was summoned by Mossad head Yitzhak Hofi and told that Mossad’s Tehran representative, Eliezar Shafrir, had received a plea to assassinate Khomeini from Shapour Bakhtiar, appointed caretaker prime minister by the Shah to head off growing protests.

Another official present gave a negative reply: if Khomeini returned to Iran, he’d be dealt with by the army and the Shah’s security police, Savak. Alpher took a deep breath and suggested: “We simply don’t know enough about what Khomeini stands for, and what his chance are, to justify the risk.”

Underestimating Khomeini was a failure not just of Mossad, but of the United States, Britain, and Savak itself. Knowing what he knows now, what advice would Alpher have offered?

“If the conversation had been a few months later, I would have said it’s worth the risk,” Alpher said. “I’m not saying the head of Mossad would have decided differently had I offered a different opinion, but it’s an incident that stays with me.”

Trying to remember Khomeini - 36 years after the revolution in Iran Read more

In power, the revolutionaries quickly revealed their intentions. “We saw how they dealt with the rest of the opposition, all the executions, and we got an appreciation of their determination,” said Alpher. “They made no bones of their plans to export revolution...Bakhtiar had apparently understood all this, but we didn’t know Bakhtiar and we certainly didn’t know the clergy. We just didn’t get it.”

Alpher’s riveting book - based on experience and a raft of interviews - surveys a “Periphery Doctrine” developed in 1957-8 in the office of prime minister, David Ben Gurion, through which Israel found regional allies against the hostile “Arab core” of states led by Egypt under Gamal Abdul Nasser.

“The Mossad is under the prime minister, there is no anomaly whatsoever in the fact that Ben Gurion the prime minister assigned this task to the Mossad,” Alpher explained. “He wasn’t skirting the foreign ministry. These were secret relations and that’s the job of the Mossad, which reports to the prime minister.”

Mossad operatives like Alpher courted both countries and ethnic or religious minorities within them. These variously included Ethiopia, Sudan, Morocco and Greece as well as Lebanese Maronites, Iraq’s Kurds, and the south Sudanese.

Mossad operatives were in northern Iraq training Kurdish fighters for the battles with Saddam Hussein’s Iraq, until the Shah pulled the plug, ending support for the Kurdish rebellion with his 1975 Algiers agreement with Saddam.

The “flagship” of Israel’s search for Middle Eastern allies was Trident, an intelligence alliance with Turkey and Iran from the late 1950s. With Iran this lasted until the 1979 Revolution, and with Turkey until prime minister Recep Erdogan took a distance from Israel around 2009.

“The head of our trade mission in Tehran was a highly experienced ambassador,” notes Alpher. “He had access to the shah, but he didn’t have [formal] rank, he was never invited to diplomatic cocktails, because the Iranians wanted a degree of deniability [about their relationship with Israel] vis-a-vis the Arabs.”

Declassified: Washington’s hesitant plans for a military coup in pre-revolution Iran Read more

Overall, the periphery doctrine waned in the 1980s with progress in peace talks with ‘core’ Arab states and apparently the Palestinians, before re-emerging after 2010 in a different guise as Israel confronted not hostile Arab states but various strains of militant Islamism.

“Today if you want to define a hostile ring, it’s more amorphous: first and foremost non-state actors, Hezbollah, Hamas; and now potentially Daesh [Islamic State] and Jabhat al-Nusra [the Syrian militant group allied to al-Qaeda],” Alpher said. “There is a fluid, revolutionary situation all around us that requires us to be on our toes, to look at the area as a mosaic and be ready to jump from one square to another to exploit out interests. Further afield we find Iran and Turkey – Iran definitely as a supporter of Hezbollah, while Turkey is more difficult to define as part of a hostile ring ... [as despite diplomatic strains its] trade [with Israel] is booming. ”

So who does Israel regard as the bigger threat? The axis of Iran, Hezbollah and the Syrian regime of president Bashar al-Assad? Or the militant Sunni Muslim groups, including the Islamic State and Jabhat al-Nusra?

“They’re both as bad,” said Alpher. “In fact if you have to attach urgency to the task of dealing with one or the other, the more urgent task would be Hezbollah and Iran - Assad has almost become a passive player here. They continue to proclaim that we’re their immediate enemy, whereas Daesh doesn’t talk about us. Undoubtedly as Islamic fanatics they want to get rid of us but they have a long hit-list ahead of us.”

Facing the hostile ring, Israel has built links with Azerbaijan, Rumania, Greece and Cyprus, and has expanded trade with Russia, China and India. This reflects Israel’s strength compared to the 1950s when the periphery doctrine evolved, said Alpher: “We have more options, we no longer have our backs to the wall.”

There is also the matter of Israel’s relationship with the Arab states of the Persian Gulf, including Saudi Arabia, which are as ‘secret’ as the Shah’s oil exports to Israel.

“Bibi [Netanyahu, the Israeli prime minister] got up in the UN a year and half ago and proclaimed it [Isreal’s links with the Gulf Arab states],” said Alpher. “He said it very openly. How much substance there is to this relationship is another question, but at least there’s something to it. And yet it’s ambivalent because they [the Gulf Arab states] have a hand in cresting these organisations [Isis and Jabhat al-Nusra], and they still do if you take a look at what’s going on in Idlib [the province in north-west Syria mainly held by Jabhat al-Nusra] and so forth.”

There is also trade between Turkey and the Gulf Arab states going through Israel because it can no longer go safely through Iraq and Syria. “Turkish lorries drive from Haifa [the Israel port] to the Beit She’an valley into Jordan, to bring Turkish exports to the Arabian peninsular. The Turkish licence plates are on their trucks, they arrive by ferry and they keep going. It’s been happening for several years and there is a huge commercial interest in some sort of status quo.”

Alpher is downbeat about Iran. His book has a chapter on what he calls “periphery nostalgia”, the belief in Israel that better relations could return either by the authorities in Tehran changing or being removed. This has faded since the 1980s when Israel sent arms during the war with Iraq, although Alpher detects an “equivalent” today within the Obama administration.

“They’re saying do this nuclear deal with [president Hassan] Rouhani and [foreign minister Mohammad Javad] Zarif and it will empower them to moderate Iranian political life to the benefit of everyone, Iranians and non-Iranians,” he said. “I hope they succeed. I don’t object to having ten years without having to worry about an Iranian nuclear weapon, but what bothers me is that they tend to translate this into a tolerance on the ground for Iran’s drive for regional hegemony, in Iraq, in Syria and perhaps in Yemen.”

Perhaps it could all have been different. Shafrir, Mossad’s former man in Tehran, and Alpher live today near each other in Tel Aviv. “We meet at the swimming pool,” said Alpher. “And, yes, we chat.”

This article was amended on 6 June 2015 to reflect that Shafrir was not the official who replied to Bakhtiar’s request.