Ali Larijani, Iran’s parliamentary speaker, has long been an advocate of better relations with Russia and his recent interview with TASS, in which he spoke of Iran’s “eastern orientation, first of all towards Russia…[as] the country’s strategic choice”, is no surprise.

But Iran’s relationships with all international powers are becoming more nuanced as the result of changes in the region. Last July’s nuclear agreement with world powers, including the ‘Great Satan’, has helped produce a diplomatic palate with many shades of grey. There are few steadfast allies or implacable enemies.

For Iran, Russia is a strategic ally in supporting Syria’s president Bashar al-Assad, and Russia is also a potential partner in shaping the global gas market as the two countries with the largest reserves. But there are still important differences between Moscow and Tehran.

Even though Russia is contracted to Iran over nuclear energy – the provider of Bushehr, Iran’s only operating station, and in talks over eight more – it blocked neither Iran’s referral to the UN security council in 2006 nor the subsequent sanctions.

In 2005 Larijani began his first of two years as secretary of the Supreme National Security Council pursuing a ‘tilt to Moscow’ that he believed could stop both referral and UN sanctions.

In January 2006, as the prospect of referral to the security council loomed, Larijani told me in an interview in Tehran that Iran was exploring possibilities with Moscow for enriching uranium on Russian soil. Larijani was in typical good form, with the quick wit of a man who had studied Kant.

Expressing disdain for the western countries’ request for a document supposedly from the network of rogue Pakistani scientist AQ Khan showing a weapons design, Larijani quipped: “If you can find anyone in the world who can make a bomb with one and a half pages, we will cover their whole body with gold.”

Larijani’s sharpness didn’t, however, make the ‘tilt to Moscow’ successful. I was later told by a regime insider that Ayatollah Ali Khamenei, the leader, felt badly let down by Larijani when Russia backed UN sanctions, and one can surmise this was a factor in his replacement in October 2007 by Saeid Jalili.

A decade later, the Geneva nuclear agreement has made possible closer ties between Iran and Russia, with Moscow now saying it will supply the S300 missile defence system it deemed blocked under UN sanctions. Russian companies are itching to win contracts in Iran.

Tehran and Moscow are also on the same side in Syria backing president Assad, with Iranian advisors from the Islamic Revolutionary Guard Corps and Russian air strikes and a more limited troop presence. But even in Syria, there are nuances – and one important difference between Iran and Russia is rooted in Moscow’s close relationship with Israel, a state Tehran says it will never recognise.

When Russia began bombing groups in rebellion against Assad in September, there was a real danger of a flare-up with Israel, which has itself hit targets in Syria on the other side of the conflict, given its concerns over Assad’s alliance with Hezbollah, the militant Lebanese group with whom it last went to war in 2006.

Yossi Alpher, a former Mossad analyst and operative, recently told me that “coordination” between Russia and Israel over Syria and been a success and represented “a major strategic development in the Middle East”.

“When the Russian air-force began setting up in the Alawite coast of Syria, the first foreign leader to go to Russia, who rushed to meet Putin, was Bibi” Netanyahu, Israeli prime minister, said Alpher. “[Netanyahu told them]: ‘Okay we’ll have our armies coordinate. You’re bombing, we occasionally bomb to interdict arms transfers to Hezbollah’.”

The biggest potential flashpoint between Russia and Israel has been in Russian planes flying over Israeli-held territory in the Golan – but both sides have been prepared to take the action necessary to prevent the kind of incident in which Turkey downed a Russian plane in November.

“We shot down Syrian planes that flew over the Golan, but not Russian planes,” said Alpher, adding that co-ordination had been done “very efficiently” given that reaction time in such incidents might be only seconds.

Alpher has a long standing interest in Iran’s role on the wider regional chess board. His book Periphery, published last year, looked at a doctrine according to which Israel has long sought allies in the Middle East, including Iran before the 1979 Revolution: in it, he recalled his presence in a discussion in Mossad in 1979 over whether to kill Ayatollah Ruhollah Khomeini.

Alpher’s compelling new book, No End of Conflict, focuses on the Israeli-Palestinian conflict in an attempt to restore the centrality of an issue he feels is being neglected, and in it he looks at Israel’s growing relations with the Arab states, including Saudi Arabia, that are born in part of a shared fear of Iran.

“We have never had the present degree of strategic cooperation with our Arab neighbours – with Egypt over Gaza and Sinai; with Jordan with regard to Syria and Iraq; with the Saudis with regard to Iran and Daesh [Islamic State group],” he told me. “They’re not pressuring us on the Palestinian issue, which makes the issue less urgent.”

Unlike many of the Israeli right, Alpher is unhappy with this. He believes demographic change in the occupied West Bank is undermining the chance of a two-state solution with Israel remaining a democratic, Jewish state. “[As] we swallow up the West Bank and east Jerusalem, and do nothing about Gaza,” he told me, “we are pushing ourselves down this slippery slope towards becoming something that is no longer a Jewish, Zionist, democratic entity.”

Like Larijani, Alpher has his eye on Russia, and plans his next book on Israel’s relationship with Moscow going back to the Soviet period.

His “former bosses” in Mossad have told him it will have to be a novel. “They said, ‘You wanna write about this? Only as fiction’.”

The Tehran Bureau is an independent media organisation, hosted by the Guardian. Contact us @tehranbureau