Al-Qaeda is creating its most powerful stronghold ever in north-west Syria at a time when world attention is almost entirely focused on the impending defeat of Isis in the east of the country. It has established full control of Idlib province and of a vital Syrian-Turkish border crossing since July. "Idlib Province is the largest al-Qaeda safe haven since 9/11," says Brett McGurk, the senior US envoy to the international coalition fighting Isis.

The al-Qaeda-linked movement, Hayat Tahrir al-Sham (HTS), which used to be called Jabhat al-Nusra, has long been the most powerful rebel group in western Syria. After the capture of east Aleppo by the Syrian army last December, it moved to eliminate its rivals in Idlib, including its powerful former Turkish-backed ally Ahrar al-Sham. HTS is estimated to have 30,000 experienced fighters whose numbers will grow as it integrates brigades from other defeated rebel groups and recruits young men from the camps for Internally Displaced Persons (IDPs) who have sought refuge in Idlib from President Bashar al-Assad's forces.

Al-Qaeda is growing in strength in and around Idlib province just as Isis is suffering defeat after defeat in eastern Syria and Iraq. Its latest setback was its failure on Tuesday to stop the Syrian army linking up with its enclave at Deir Ezzor, where Isis has been besieging the government held part of the city for three years. Divided by the Euphrates, the city is the largest in eastern Syria and its complete recapture opens the way to the al-Omar oilfields that once provided half of Syria's crude production.

The end of the siege, supposing encircling Isis forces are permanently driven back, frees up a Syrian army garrison of 5,000 to 10,000 soldiers as well as the 93,000 civilians trapped in the government-held zone who had been supplied with food by airdrops. Deir Ezzor is only the latest Isis urban centre to be lost on the Syrian portion of the Euphrates valley which was the heartland of its territories in Syria. Isis is everywhere on the retreat. Upriver from Deir Ezzor at Raqqa, the American-backed and Kurdish-run Syrian Democratic Forces are fighting their way into the city and has captured its old city quarter in the last few days.

Despite its proven fighting prowess, Isis is collapsing under the impact of ground attacks launched by different parties on multiple fronts in Iraq and Syria. What tips the balance against it in all cases is the massive firepower of the Russian and US air forces in support of ground assaults. Isis's defeat in eastern Syria will accelerate as local tribes, previously won over or intimidated by Isis, join the winning side. The US and the Syrian Kurds may not like the return of Syrian government authority in eastern Syria, south of Raqqa, but they do not look as if they are prepared to fight hard to stop it. President Trump's priority is to eradicate Isis and al-Qaeda, regardless of who rules Syria in future.

Bad news for Isis is good news for HTS and al-Qaeda. Its defeat preoccupies its myriad enemies and largely monopolises their military efforts. Short of combat troops, the Syrian army is only really capable of making a maximum effort on one front at a time. The Syrian Kurds have an interest in fighting Isis but not necessarily defeating it so decisively that the US would no longer need a Kurdish alliance and could return to the embrace of its old Nato ally Turkey.

HTS stands to benefit politically and militarily from the decline of Isis, the original creator and mentor of Jabhat al-Nusra, as the earliest of al-Qaeda's incarnations in Syria was known. Under the name of al-Nusra, the Syrian branch of the movement split off in 2013 and the two sides fought a bloody inter-jihadi civil war. If Isis is destroyed or rendered a marginal force, Sunni Arab jihadis refusing to surrender to Mr Assad's army and intelligence service will have no alternative but to join HTS. Moreover, Sunni Arabs in eastern Syria may soon be looking for any effective vehicle for resistance, if Syrian government armed forces behave with their traditional mix of brutality and corruption.

HTS will expect the many states now attacking Isis, and battering to pieces its three-year-old caliphate, to turn on them next. But they will hope to delay the confrontation for as long as possible while they strengthen their movement. Ideologically similar but politically more astute than Isis, they will seek to avoid provoking a final territorial battle which they are bound to lose. Some Syrian specialists warn against waiting too long. "The international community must seek urgently to counter-attack HTS, which grows stronger by the day, without waiting for the complete destruction of the Islamic State," writes Fabrice Balanche in a study published by the Washington Institute for Near East Studies called Preventing a Jihadist Factory in Idlib. He says that HTS wants to dominate the whole Syrian rebellion and is close to succeeding.

The open dominance of an extreme Islamic jihadi movement like HTS creates a problem for foreign powers, notably the US, UK, France, Turkey, Saudi Arabia and Qatar, previous funders and suppliers of the Syrian rebels. HTS, whose attempt to distinguish itself from al-Qaeda has convinced few, is listed in many countries as a terrorist organisation, unlike its former ally, the Ahrar al-Sham. It will be difficult for foreign powers to do business with it, though the armed opposition to Mr Assad has long been dominated by extreme Islamist jihadi groups. The difference is that today there are no longer any nominally independent groups through which anti-Assad states and private donors can channel arms, money and aid while still pretending that they were not supporting terrorism.

Isis declared war against the whole world in 2014 and inevitably paid the price of creating a multitude of enemies who are now crushing it in Syria and Iraq. Many of the members of this de facto alliance always disliked each other almost as much as they hated Isis. It was only fear of the latter that forced them to cooperate, or at least not fight each other. It may not be possible to recreate the same unity of purpose against al-Qaeda.