What a difference a war makes. Twelve months ago, Vladimir Putin was on the menu at the G20 summit in Brisbane.
Western leaders queued up hungrily for a piece of Russia’s president following his armed intervention in Ukraine and illegal annexation of Crimea.

United States President Barack Obama warned Putin he was isolated internationally; British Prime Minister David Cameron said he did not trust the Russian leader; Stephen Harper, Canada’s then prime minister, told Putin bluntly: “Get out of Ukraine.”

Reacting angrily to the imposition of sanctions, Putin said Western leaders had switched off their brains and were making matters worse by punishing Moscow. But the criticism continued unabated and then he left the meeting early in a huff.

Fast-forward to this week’s G20 summit in Turkey and everything, it seems, has changed. Putin was pictured in a huddle, chatting animatedly to Obama and the US national security adviser, Susan Rice. He also held reportedly productive talks with Cameron and other leaders. No longer ostracised, Putin was the man every­body wanted to meet.

The reason is not a mystery. Under merciless attack from the Islamic State, flailing on the refugee crisis, and consequently desperate to end the war in Syria, European leaders, backed by Obama, have come to an uncomfortable but, in historical terms, not wholly novel conclusion: they need Russia.

Speaking after Friday’s terror attacks in Paris, Nicolas Sarkozy, France’s former – and possible future – president, called for a new, all-inclusive international coalition to fight the Islamic State. “We must draw on the consequences of the situation in Syria,” he said. “We need everyone in order to exterminate Daesh [Islamic State], including the Russians. There cannot be two coalitions in Syria.”

François Hollande echoed his predecessor’s call for united international military action in concert with Russia when he addressed the French Parliament on Monday.

Cameron took a similar line. He urged Putin to concentrate Russian fire on Islamic State targets rather than the Western-backed Free Syrian Army, and told him Britain was ready to compromise on a peace agreement and transition in Syria.

The White House said Obama and Putin had agreed on the need for a “Syrian-led and Syrian-owned political transition, which would be preceded by United Nations-mediated negotiations between the Syrian opposition and regime as well as a ceasefire”.

Putin scores diplomatic hat-trickThis all boils down to a diplomatic hat-trick for Putin. First, he has gained Western recognition that Russian military forces have a legitimate role to play in Syria, in exchange for vague promises to co-operate with the US-led coalition and not to shoot the “good guys”. This marks a complete reversal of the initial US position, which was that Moscow’s intervention was unwelcome and “doomed to failure”.

This new understanding gives Putin the political cover he needs at home after Moscow’s belated admission that an Islamic State bomb brought down the Russian Airbus over the Sinai, an attack that claimed almost twice as many people as the Paris shootings.

Putin said on Tuesday that Russian combat operations would be intensified, and he quickly kept his word, launching cruise missile and long-range bomber attacks. He now has a free hand, and he will use it. “We will search for them anywhere they might hide. We will find them in any part of the world and punish them.”

Second, Obama and Cameron have been forced to accept that Syrian President Bashar al-Assad may stay in office, possibly for the duration of the proposed 18-month, UN-supervised peace negotiation, as Putin has insisted all along.

Until recently, Western and Arab leaders had been demanding Assad’s immediate departure. Cameron has also offered explicit assurances that Russia’s strategic interests in Syria, which include its Mediterranean air and naval bases, would be fully recognised and protected in any settlement – another key Putin objective.

Third, Putin appears to have succeeded in gaining tacit acceptance of the de facto situation in Ukraine. The fighting in eastern Ukraine has in any case subsided following the Minsk Accords. But Russia remains firmly in control of Crimea, and its illegal annexation now appears set to become an established fact of life.

Crimea not up for discussionOfficials say Obama raised Ukraine with Putin at their G20 meeting. But the return of Crimea was not up for discussion. The conclusion must be that Putin’s gamble in flagrantly breaching international law has paid off and Crimea is now permanently lost to Kiev.

It would be a mistake to interpret all this as a rehabilitation of Putin. Russia remains under sanctions. It faces growing economic problems, due partly to the low oil price. Putin remains a deeply suspect figure in the eyes of Western leaders, who worry what he may get up to next, especially in the post-occupation Iraq and Afghanistan.