WHEN an alliance of disgruntled Sunnis led by the Islamic State (IS), an extremist group formerly known as the Islamic State of Iraq and Greater Syria (ISIS), streaked across Iraq in June and proclaimed a caliphate in the territory it holds on both sides of the Syrian-Iraqi border, Syrian rebels with a more national focus thought their day had come. Surely, they surmised, America and its Western allies would not sit by and allow to prosper a group that had grown out of al-Qaeda in Iraq and killed American soldiers during the war there in 2003? Bar the Americans getting involved militarily, the only way for them to push back IS in Syria would be to bolster the more moderate rebels there. A little more weaponry, mainly anti-tank missiles, did indeed arrive for eight vetted groups that have been supplied by a covert programme that since last year has been run by America and states in the Gulf and Europe that want to see the back of Bashar Assad, Syria’s president. These groups have made some gains in the northern part of Hama province and the southern part of Idleb, near the regime’s stronghold in western Syria (see map). But the main picture has not changed. Syria’s regime and IS both gain from the mess next door in Iraq, whereas the more moderate rebels are increasingly being squeezed. “The aid is for a plan to deal with a 2012 problem, not a 2014 one,” says Noah Bonsey, an American Syria-watcher at the International Crisis Group, a Brussels-based think-tank.

After transferring some of their new and extensive haul of money and weapons from Iraq back to Syria, IS has set about eradicating other rebels from the eastern Syrian province of Deir ez-Zor. In a string of attacks in early July, it took control of a series of towns along the Euphrates river. Hitherto the Syrian regime had co-existed with IS, as it provides a useful spectre of what the regime says would replace Mr Assad, were he to fall. But more recently IS has also clashed with the regime. On July 25th it captured Division 17, a long-contested army base in Raqqa. A day later it took a second base in the north-eastern province of Hasaka.

In response, Syria’s regime has carried out more air strikes on IS targets. On July 26th it snatched back an IS-held oilfield in the centre of the country. But it still concentrates on quashing the mainstream opposition. Mr Assad’s troops, backed by foreign Shia fighters, are still making slow, steady gains against the non-jihadist rebels. The regime has been focusing on Aleppo, the northern hub that has been racked by war since July 2012, squeezing the rebels’ main supply route in the north-east of the city.

The fighting gets ever grimmer. One seven-day spell in July was the bloodiest so far in the three-and-a-half-year conflict: 1,700 people, including 270 regime soldiers, are reported to have been killed. Mr Assad, who shows no sign of falling, continues to target civilians. Human Rights Watch, a New York-based group, says the regime’s use of crude barrel bombs has increased of late, with 650 dropped since February in Aleppo alone, killing at least 1,500 people. The UN, which this month made its first cross-border delivery of aid into rebel-held Syria (a measure hitherto blocked by Syria and Russia), says the regime has stepped up the bombing of medical facilities. The refugee tally is about to exceed 3m. In another example of its hallmark brutality, meanwhile, IS released footage of its beheading of soldiers after it took Division 17.

Amid such stresses, more cracks are appearing between the remaining rebel forces that banded together at the start of the year to force ISIS, as it then was, from territory in north-western Syria. A tape leaked on July 11th suggested that Jabhat al-Nusra, another extremist group recognised by al-Qaeda as the holder of its franchise in Syria, appears to be debating whether to set up its own small emirate to rival the one declared by IS. It has been clashing with other rebel groups in parts of Idleb. The group denied such an intention, but relations with others, in particular the Islamic Front, the most powerful coalition of rebel forces, have become increasingly tense.

Syria’s war is likely to continue along this trajectory. A $500m package of lethal aid to the rebels proposed by Barack Obama is unlikely to be endorsed by Congress. In a year or two, the rebels may be seen as bit-players in a Syria divided between IS and Mr Assad’s lot. After repeated Western calls for Mr Assad to go, and after more than a trillion dollars have been spent by the West in Iraq, Western governments, especially America’s, must face two big questions, says Mr Bonsey: “Are you OK with IS holding all of rebel-held northern Syria, perhaps with odd patches controlled by Jabhat al-Nusra? And what do you say to Sunnis who want someone to back against the [Shia] regime in Baghdad, and their only option is IS?”

Correction: An original version of this story reported that Syrian rebels have been armed with anti-aircraft missiles, when in fact they have been armed with anti-tank missiles. Sorry.