AFTER four and a half years that have ravaged the country and sucked in ever more combatants—the latest being Turkey—Syria’s ghastly civil war seems as intractable as ever. But like the twisting narrative of an endless television serial, its multiple subplots do give hints of inching to a conclusion. Not, most likely, in this current hot and bloody summer season, but perhaps in the not-too-distant future.

Until early this year two of Syria’s players, the regime of Bashar Assad and Islamic State (IS), were in the ascendant. The tide against both has since turned. Recent analysis by Jane’s, a defence analyst, suggests that after a series of losses to both IS and other, rival rebel groups, the area fully controlled by government forces has shrunk since January by some 16%, to a mere 30,000 square kilometres (11,600 square miles), or barely a sixth of Syria’s territory.

And this was before a recent offensive by a coalition of mostly Islamist militias calling itself Jaish al-Fatah, which on July 28th captured the government’s last salient on the route linking Syria’s second city, Aleppo, to the coast. The advance, which follows the fall in March of a provincial capital, Idlib, and of another big town, Jisr al-Shughour, in April, further consolidates rebel control of Idlib province. Jaish al-Fatah now threatens both the surrounding rich agricultural region and the coastal mountain range that is the heartland of Mr Assad’s own Alawite sect.

Earlier this year, Mr Assad’s forces lost the desert city of Palmyra to IS, as well as their last toeholds in the far south, along the border with Jordan, to other rebel groups. Far to the east a government enclave around the town of Hassaka has held out against IS attacks, chiefly due to help from autonomous Kurdish and Christian militias. Whereas last year government forces appeared poised to encircle rebels in Aleppo, at present it is Mr Assad’s men, who hold half the city but rely on long, exposed supply lines, that look vulnerable on this far more vital front.

Analysts cite several reasons for the government’s setbacks. Foreign backers of Sunni rebel groups, including Saudi Arabia and Turkey, have increased the volume and quality of military supplies, helping redress a stark imbalance in firepower. Mr Assad’s own forces, depleted by attrition, desertion and a leakage from the formal army into informal pro-government local militias, no longer have the manpower and discipline to sustain multiple fronts. They rely increasingly on foreign Shia “volunteers”, including Iranian-trained Iraqi and Afghan fighters, and Lebanon’s Hizbullah. The latter has been bogged down in a long siege of the town of Zabadani, a rebel enclave on the border with Lebanon.