IF THERE is any comfort in recent attacks by IS, it is that they are uniting its enemies, and bringing together countries that have stood at opposite ends of the wider war in Syria. Since October France, Russia, Lebanon and Turkey have together lost more than 500 of their citizens. On November 18th the group declared it had killed two more, a Chinese and a Norwegian hostage. But if there is now a shared priority of defeating “Daesh”, as it is sometimes known, trust remains frayed.

The five-year civil war in Syria has entangled not just local belligerents but a host of meddling outside powers. It has placed Russia and Iran, tacitly backed by China, on the side of Bashar al-Assad, Syria’s ruler; on the other stands the West along with Sunni powers such as Turkey and Saudi Arabia. Diplomats have struggled to bring the rivals together. A round of peace talks in Vienna on November 13th produced a vague road map for a ceasefire, a period of transition and elections, but left unresolved the vexed question of the fate of Mr Assad.

At the G20 summit in Turkey on November 15th and 16th, there were further signs of progress. Last year’s meeting, clouded by tensions over Ukraine, was so frosty that Russia’s president, Vladimir Putin, flew home early. This year he huddled in chats with Barack Obama and Britain’s prime minister, David Cameron. Russian commentators drew parallels with the anti-Hitler alliance that brought together Stalin, Churchill and Roosevelt.

By mid-week Russia and France, which have sparred with particular bitterness over Syria, were working together to intensify the bombing of Raqqa, the capital of IS’s “caliphate”. Russia ordered its eastern Mediterranean fleet to make room for a French aircraft-carrier. But Russia has also continued to pound Syrian rebel groups that are backed by the West, as well as insisting that Mr Assad must stay.

The 17 parties to the Vienna meeting have set a date of January 1st for the transition process to start. The idea is that the UN will broker and monitor a ceasefire while the Syrian regime and the fractured opposition form a transitional government. Elections are then to be held by 2017. The tricky process of distinguishing between “terrorists”, who will be excluded from joining the transitional government, and legitimate opposition, which may take part, will be led by Jordan.

That the Vienna process now includes Iran, long excluded, gives some grounds for hope. But there are plenty of reasons for scepticism, too. Jordan’s job is almost impossible. Some of the rebel groups Russia has been bombing in the name of fighting terrorism are backed by America. Britain, meanwhile, has said that a transition may have to involve some of the less unsavoury rebel groups, including devout Islamists but excluding IS and Jabhat al-Nusra, the Syrian affiliate of al-Qaeda. Expect there to be prolonged and cynical horse-trading over the list.

The future of Mr Assad is still a big sticking-point. But it is becoming ever clearer that the West now wants to prioritise the battle against IS, and leave Mr Assad for later. “Assad can’t be the long-term solution, but our enemy in Syria is Daesh,” François Hollande said this week. In the short term, therefore, Mr Assad looks increasingly like a presence to be tolerated, even by America and its allies. Russia says demands for Mr Assad’s exit must stop. That will not happen; there is too much blood on the Syrian leader’s hands for the West to agree to let him stay in place indefinitely. And Western officials quietly believe that Russia, by intervening in Syria, is coming to the realisation that Mr Assad is a liability.

On November 17th Russia acknowledged that a bomb brought down a Russian airliner over Egypt in October, thus aligning its position with the West’s. Mr Putin promised retribution: “We will find them at any point on the planet and punish them.” If Russia backs its tough words with action against IS and comes to regard some anti-Assad groups as allies, then the caliphate’s end may be in sight.