RECENTLY Vladimir Putin took officials to Moscow’s lavish new Jewish museum for a meeting on inter-ethnic relations. After a kosher breakfast and a short tour with Hasidic rabbis, he enthused that even Israel did not have anything on this scale. Mr Putin, the first Russian leader to visit Israel (twice), could hardly have shown more enthusiasm for the Jewish state.

Yet Russia continues to vote with the Palestinians at the United Nations, to invite Hamas to Moscow, to help Iran with its nuclear programme and to sell missiles to Syria, which then end up in the hands of Lebanon’s Hezbollah. In truth, a degree of disconnect has marked Russia’s relations with Israel ever since its foundation in 1948. Stalin supported and armed Israel, hoping to use it as an ally against Britain and America, yet he still murdered Jewish anti-fascist leaders at home and made anti-Semitism into a state policy.

After the six-day war in 1967 Moscow cut diplomatic ties with Israel and in the subsequent war of attrition it not only armed and trained Arab forces but also secretly sent in air-force squadrons. A heavy use of Russian missiles by Syria and Egypt in the Yom Kippur war in 1973 made Israel realise that “Russian equipment could temporarily overwhelm us,” in the words of Efraim Halevy, a former head of Mossad, Israel’s security service.

When Mikhail Gorbachev renewed diplomatic ties with Israel in 1991, the Soviet Union was near collapse. But as Russia became assertive under Mr Putin a decade later, a return to the Middle East was only a matter of time, says Tatyana Karasova, an analyst of Russia-Israel relations. The motives were pragmatism and money. Israel’s sympathy for Russia’s war in Chechnya in 1999 made it a natural ally. But demand for Russian arms from its former Arab clients made them an irresistible market.

Officially, Moscow maintains its support for Palestinians. Yet on a personal level Mr Putin seems to admire Israel’s ruthlessness in dealing with its enemies and particularly its tough stance when talking to its biggest friend, America, illustrated by recent tension between President Barack Obama and Binyamin Netanyahu, Israel’s prime minister. Alexander Shumilin of the Institute of USA and Canada, a think-tank, says Russia’s duality reveals a lack of a clear strategy, an aversion to complexities and a preference for ad-hoc decisions.

Mr Putin’s feelings for Israel were enhanced by his passionate interest in the Holy Land. Israel obliged him when it agreed in 2008 to transfer back to Russia an area in Jerusalem called the Sergei courtyard, part of the Russian compound that had belonged to Moscow patriarchy and was sold in 1964 for a load of oranges. The Israelis also halted military supplies to Georgia after the 2008 war. In turn, the Kremlin promised not to sell an S-300 air-defence system directly to Iran.

Zvi Magen, a former Israeli ambassador to Moscow, says that since Mr Putin returned as Russia’s president last year bilateral relations have been better than ever. One reason was Avigdor Lieberman, Israel’s Soviet-born former foreign minister (now on trial in Israel on charges of breach of trust). Three days after the rigged Duma election in late 2011, Mr Lieberman was the first foreign politician to congratulate Mr Putin on his party’s victory, saying that his observers had spotted no violations.

Mr Lieberman always had a strong following among the influential Russian diaspora in Israel. Mr Putin’s freedom from anti-Semitism—ingrained in many of his former KGB colleagues—also won him favours with Jewish leaders in Russia.

Yet Maksim Shevchenko, an anti-Israel commentator, argues that Russia’s relations with Israel must not jeopardise its support for the anti-American coalition that includes Iran and Syria. He describes the civil war in Syria as a proxy conflict between NATO and Saudi Arabia on one side and Russia and Iran on the other. Despite some attempts by Russian diplomats to make contact with the Syrian opposition, defending Bashar Assad’s regime remains a priority for the Kremlin—not least as part of its anti-Americanism at home.

Speaking to military and civilian officials led by Mr Putin last month, Russia’s defence minister, Sergei Shoigu, confirmed plans for a permanent military naval flotilla in the Mediterranean to “protect Russian national interests”. Pavel Felgenhauer, a Russian military analyst, says that it is also likely that Syria will get an S-300 air-defence system against possible air strikes.

Russian officials argue that keeping Mr Assad in office is good for Israel. His fall would almost certainly result in the rise of Islamic fundamentalists in Syria. Mr Shevchenko concludes: “It does not hurt having a good relationship with Israel, even if its creation was Stalin’s big mistake.” Israelis could be forgiven for finding Mr Shevchenko’s generosity rather unsettling.