When Russia entered the Syrian civil war in September 2015 the then US secretary of defense, Ash Carter, predicted catastrophe for the Kremlin. Vladimir Putin was ‘pouring gasoline on the fire’ of the conflict, he said, and his strategy of fighting Isis while backing the Assad regime was ‘doomed to failure’. Two years on, Putin has emerged triumphant and Bashar al-Assad’s future is secure. They will soon declare victory over Isis inside the country.

The dismal failure turned out to be our cynical effort to install a Sunni regime in Damascus by adopting the Afghanistan playbook from the 1980s. We would train, fund and arm jihadis, foreign and domestic, in partnership with the Gulf Arab despots. This way we would rob Russia of its only warm-water naval base, Tartus, on Syria’s Mediterranean coast. In the process we would create a buffer between Iran and its Lebanon-based proxy, Hezbollah, to divide the anti-Israel Shia axis. And we would further marginalise Iran by extending the influence of our Sunni Gulf allies from Lebanon deeper into the Levant. Half a million Syrians were slaughtered as a consequence of this hare-brained scheme, which geo-politically has resulted in the exact opposite of the intended outcome.

Putin, though, had grasped the reality at the outset. Unlike Afghans, ordinary Syrians were used to living in a liberal, diverse culture that, while politically repressive, championed peaceful religious co-existence. Most of them were nervous about seeing their country transformed into a Wahhabi theocracy. Assad, for all his faults, was the buffer between them and internecine carnage. They stuck with the devil they knew, and there was no popular revolution against Assad — nothing compared to the Tahrir uprising that ousted the hated Egyptian dictator Hosni Mubarak. The millions-strong demonstrations in Damascus were pro-regime. Among the two-thirds of the Syrian population now living in government--controlled parts of the country, Assad is more popular than ever, and Putin is a hero.

Small wonder Putin recently mocked Washington for ‘not knowing the difference between Austria and Australia’. The same charge could, alas, be levelled at Nato leaders generally. At a UN meeting last month, the Orwellian-named Friends of Syria group — the western and Gulf Arab alliance that unleashed jihad — stated they would not engage in reconstruction efforts until (in Boris Johnson’s words) there was a political ‘move away from’ Assad. But weeks earlier, a massive international conference on reconstruction had taken place in Damascus. During it, Assad had ruled out awarding the multi-billion-dollar contracts up for grabs to hostile western and Arab countries on the grounds that they had destroyed his country. Instead, Syria would look east, and especially to Russia, Iran and China. Already Moscow is busy shipping thousands of tons of materials and more than 40 pieces of construction equipment — including bulldozers and cranes — to Syria, which does not want or need our assistance.

An inability to acknowledge, still less confront, Russia’s expanding regional role on the back of Syria was similarly highlighted during a whirlwind trip Johnson made to Libya in August. There, he had a brief meeting with secular strongman Khalifa Haftar, a former general in Gaddafi’s army whose forces now dominate eastern Libya — including Benghazi and most of the country’s major oil fields. He is determined to overrun Tripoli, and probably will. Haftar has ties with Moscow going back to the early 1970s and has been in Putin’s pocket for at least two years, repeatedly meeting with Russian officials on an aircraft-carrier off the Mediterranean coast. A week before shaking hands with Johnson, Haftar had visited Moscow to hold extensive discussions with top officials from the defence and foreign ministries. They cemented plans to move fragmented Libya towards statehood under Haftar as an all-powerful defence minister, with direct Russian military aid. The Kremlin has already deployed troops and fighter jets to western Egypt to join that country and the UAE, which is also backing Haftar in his unifying fight against the Islamists. As with Syria, for decades before the fall of Gaddafi, Russia was Libya’s biggest arms supplier and closest international ally, and Moscow has long been eyeing a naval base on the Libyan coastline to complement its (now much beefed-up) base in Tartus. Given all this, as Johnson suggested that Haftar may have a ‘role to play’ in any future political reconciliation, while insisting that he abide by an internationally brokered ceasefire, the latter must have found it hard to contain his laughter.

Syria and Libya, though, are just two examples of how Russia is running rings around the West in its determination to achieve superpower status in the Middle East. Putin has just inked a deal with Turkey — which has Nato’s second-largest standing army — to sell the latter its most advanced S-400 air defence system. (The S-400 has already been deployed across Syria, while Iran has been given the less advanced but still formidable S-300.) Shortly after Russia entered the Syrian war, Turkey had shot down one of its planes. It was a deliberate attempt to provoke a wider war by President Recep Erdogan, who was furious that Putin was, by way of a relentless bombing campaign, putting an end to his support for Isis foot soldiers inside Syria and his purchasing of oil from the caliphate. (Nato had ignored all this duplicity in the hope that Isis would weaken Assad.) It is testament to Putin’s extraordinary diplomatic skills that Russia and Turkey are these days singing each other’s praises as never before. And under Russian auspices, Turkey is working with Iran and Iraq to contain the fallout from the Kurdish referendum on independence.

When King Salman arrived in Moscow this week, it was the first time that a Saudi leader paid an official visit to Russia — but just the latest in more than two dozen face-to-face meetings Putin has had with Middle Eastern leaders. Russia, of course, is not the Soviet Union, and it is easy to see why the Saudi and other Gulf tyrannies believe they can do business with an authoritarian leader like Putin. He shares their contempt for western-style democracy; and, unlike whoever happens to inhabit the White House, he is a man of his word, promotes stability not chaos, and has no complicating human rights agenda.

On the Saudi agenda in Moscow: the rise of Iran as a dominant regional player, Syria’s de-escalation zones, and billions of dollars in Russian arms sales and direct mutual economic investment. Riyadh is still outraged that the Obama administration had agreed a nuclear deal with Iran, the Saudis’ rival for regional hegemony, and is sulking over the Syria debacle. They have only Russia to turn to in an effort to limit Tehran’s influence in Syria. For the same reason, the Israeli Prime Minister Benjamin Netanyahu has been holding meetings with Putin. During one, he was almost in tears as he, like the Saudis, begged the Russian leader to rein in Iran and Hezbollah, which seek the Jewish state’s destruction.

In a desperate last-ditch effort to stop the Putin power grab in his tracks, the Trump administration will almost certainly decertify the Iranian nuclear deal on October 15, despite the International Atomic Energy Agency, EU and UN being adamant that Tehran is abiding by its terms. The aim is to provoke military confrontation with Iran, or at the least create more regional turmoil to undermine the Kremlin. The reckless and unjustified move will throw a spanner in the works, but in the long-term is — like intervention in Afghanistan, Iraq, Libya and Syria — doomed to failure.

Putin is well ahead of the curve, having pulled off the seemingly impossible diplomatic feat of fighting alongside Hezbollah in Syria while allowing Israel to bomb Hezbollah and Syrian regime targets inside the country. Last week, a delegation from the Palestinian terror outfit Hamas visited Moscow for talks on the peace process after reconciling with arch-rival Fatah following yet another successful direct intervention by Putin. And Netanyahu has been told that, although Russia considers Israel an important partner, Iran will, come what may, remain its indispensable ally. Putin might therefore already have the diplomatic leverage needed to defuse tensions between Iran and Israel, once again leaving Washington sidelined and humiliated. For while the consequences of Netanyahu beating the war drums over Iran used to be non-existent, now Moscow could give the green light to battle--hardened Iran, Syria and Hezbollah to unleash hellfire against the Jewish state.

It is easy to understand why Netanyahu is quaking in his boots, but should we in Europe be alarmed at Putin’s Middle East triumph? Not unduly so. You do not have to be a Putin groupie to acknowledge that it isn’t him who has been launching one illegal invasion after another in the region, leaving millions dead, maimed and displaced. And he has not only stemmed the flow of Syrian refugees into our continent, but started to reverse the trend. Half a million Syrians have returned to their country this year alone.

And while no side has emerged with their hands clean from one of the most brutal civil wars in modern history, it is also hugely heartening that there were so few defections from a Syrian army overwhelmingly made up of Sunni Muslims (80 per cent by some accounts). They were battling against myriad Sunni jihadi groups in the name of an Alawite-dominated regime, alongside Russian soldiers appalled (unlike us) by the carnage unleashed against their fellow Christians, as well as hardline Shia militias sent by Iran and Hezbollah likewise determined to protect their own sect. Given how Tunisia and Turkey — the two historically secular Muslim countries in the region — are fast embracing Islamism, and how Sunni--Shia infighting continues to tear apart much of the rest of the Middle East, the victory of pluralism and secularism over the wicked Wahhabi jihad in Syria is ultimately uplifting.

Syria and Libya are just two examples of how Russia is running rings around the West

John R. Bradley is the author of books on Saudi Arabia, Egypt, and the Arab Spring, and has been covering the Middle East for two decades.