Maverick, out-of-control authoritarian leaders – and here we are talking about Recep Tayyip Erdoğan, Turkey’s president – tend to think they know best about everything, and are fiercely intolerant of criticism. It is this hubris that has finally led Erdoğan and Turkey to the brink of disaster in Syria after nine years of bombastic threats, proxy conflict and direct military intervention.

Erdoğan is now isolated on all sides, sharply at odds with other major players in the Syrian crisis. Having sent an extra 7,000 troops and armour into Idlib last month to reinforce existing military outposts, Turkey has plunged in open warfare with Bashar al-Assad’s regime. It has attacked airports and radar sites well behind the de facto “frontline”. It has declared all regime “elements” to be legitimate targets.

In mid-2011, when the Arab spring uprisings were just getting going, Ahmet Davutoğlu, then Turkey’s foreign minister, met Assad in Damascus and urged him to discuss the demonstrators’ demands. Assad refused. Davutoğlu later told me the Syrian leader just wouldn’t listen. The chance was lost. As Assad’s crackdown intensified, Erdoğan threw Turkey’s weight behind the rebels, including Islamist groups.

But what is happening now in north-west Syria is no longer a proxy war. It is a direct confrontation between the two heavily armed neighbouring states. And it threatens to draw Turkey deeper into military conflict with Russia, Assad’s principal ally. Erdoğan’s spokespeople and the pro-government media continue to suggest that last Thursday’s debacle, when 33 Turkish soldiers were killed in an attack on their convoy in Idlib, was the fault of the Syrian regime.

It’s hard to know the facts, given Erdoğan’s suppression of independent journalism. But the truth seems to be very different. The death toll may have totalled up to 55, according to Metin Gurcan, a military analyst writing for the respected online regional platform al-Monitor. Local reports speak of up to 100 dead. It also seems likely the majority of the deaths were caused not by Syrian jets but by deliberate, follow-up Russian airstrikes.

Erdoğan has declined to blame Russia, and the Kremlin has flatly denied responsibility. But the sequence of events last Thursday, which began with Turkish attacks on Russian aircraft flying over southern Idlib, suggests otherwise. The Turkish fire, involving man-portable air-defence systems (Manpads), also threatened Russia’s strategic Khmeimim base.

Infuriated Russian commanders – or maybe the order came from Moscow – appear to have drawn a line after weeks of lethal sparring. The Turkish convoy was hit late in the afternoon that same day. In the hours that followed, with injured soldiers in urgent need of medical aid, Moscow rejected Ankara’s request to open Idlib’s airspace to allow an evacuation, Gurcan reported.

Was Vladimir Putin, Russia’s president, intent on teaching Erdoğan a harsh lesson? If so, it seems to have worked. Erdoğan is now pinning his hopes on a face-to-face meeting with the Russian leader to prevent more, costly collisions that Turkey cannot win. He will travel to Moscow on Thursday in search of a ceasefire – after Putin agreed to make time for him.

Yet Putin may be in no mood to back off. He badly wants an end to the Syrian war, where Russian forces have been engaged for nearly five years at considerable financial and human cost. He wants a victory for his client, Assad, in Idlib, the last rebel-held province, and for his own expansionist regional policies. He wants to declare a landmark strategic triumph at the west’s and particularly the US’s expense.

Putin’s price for letting Erdoğan off the hook may be a full or partial Turkish withdrawal from Idlib but also from other Turkish-occupied Syrian territory west of the Euphrates – and from the Kurdish-dominated north-east region that he controversially invaded last autumn. Erdoğan’s always unworkable idea of maintaining quasi-permanent “safe zones” inside Syria to which refugees in Turkey can, in theory, return looks to be dead or dying.

The intrinsic weakness of Erdoğan’s house-of-straw strategy has been further exposed by the inability of the Islamist extremists he supports in Idlib to resist the recent Syrian-Russian advance; and by the refusal of the US and Nato to come to his assistance in any meaningful way. Turkey appealed for support after last week’s convoy calamity. Only limited help with surveillance and intelligence-sharing was offered.

Dozens of Turkish soldiers killed in strike in Idlib in Syria Read more

Once again, Erdoğan is reaping what he sowed. He has repeatedly mocked and criticised Nato, the US and European leaders in vituperative and contemptuous terms. He bought a Russian air-defence system over strong American objections. He has jeopardised the west’s fight against Islamic State by waging war on Syria’s Kurds. And he has tried to weaponise the Syrian refugee crisis to bend the EU to his will –hence the current chaos and misery on the Greece-Turkey border. Unsurprisingly, domestic opposition is growing, spurred by the Syrian quagmire.

As the Idlib crisis intensified in recent months, Erdoğan claimed his sole purpose was to uphold a 2018 partial truce and prevent another mass refugee influx into Turkey. These are reasonable aims. But his aggressive tactics and angry rhetoric, as usual, have proved self-defeating. A million displaced, hungry and terrified Idlib residents may soon have no defence at all against Assad’s pitiless advance.

The humbling of Turkey is no cause for cheer in Europe and the US. What it does do is underscore its responsibility – so far shamefully ducked – to intervene directly in the Idlib crisis to protect civilians, halt the fighting, and pursue a wider peace. Leaving it to Erdoğan was never going to work. The western democracies have a last chance to do the right thing in Syria: manufacture and enforce a just and lasting settlement – and tell Putin and his bombers to go home.

• Simon Tisdall is a foreign affairs commentator