THE civil war in Syria, a nightmare for most Syrians, is a dream come true for the Islamic State of Iraq and al-Sham (ISIS), the latter name being variously translated as “Greater Syria” or “the Levant”. The extremist group, formed in Iraq in 2006 as a broad jihadist front that includes al-Qaeda in Iraq, has had its best year to date for expansion. In Syria it runs a clutch of towns, taking it a step closer to its goal of creating a limitless Islamic caliphate. In Iraq its campaign of bombing against Shia Muslims, whom it considers heretics, and of assassinations of its opponents, has reached a new pitch of fury.

Syria’s power vacuum has given it an ideal base. Since expanding into the country in April, ISIS has spread across the northern and eastern provinces abutting Iraq and Turkey to include thousands of fighters on both sides of the border. Its foreign leadership is experienced, its footmen, foreign and Syrian, well-trained and disciplined. Its control of Syria’s oilfields has added wealth to the funds it gets from donors in the Gulf. It has sought to increase its popularity by providing services, such as supplying bread, and activities including Koranic classes for children.

But the group has ruffled feathers by becoming increasingly aggressive. It is fighting to control the border between Syria and Turkey. Last month it kicked out Northern Storm, a local rebel force, from Azaz, a staging post north of the Syrian city of Aleppo. Another border town under its control has been renamed the “emirate of Jarablus”, complete with a religious school and posters extolling the virtue of the full veil for women.

Other rebels have always been wary of ISIS, but are awestruck by its fighting prowess. Some Islamist groups have joined forces with it to fight against Kurdish militias who have taken over Syria’s north-east. Yet ISIS’s strength and ideology have led to clashes with a range of rebels, not just Kurds, from Azaz to the eastern city of Deir ez-Zor. Some smaller rebel bands, nervous of being clobbered by ISIS, have merged with it. In Raqqa, the only provincial capital in rebel hands, all groups have now signed up to it or to Jabhat al-Nusra, the other al-Qaeda-linked outfit that is nearest to it in clout.

ISIS and its leader, Abu Bakr al-Baghdadi, an Iraqi, have grand ambitions, as heralded by the use of “state” in the group’s name. ISIS’s foray into Syria has led it openly to defy al-Qaeda’s overall leadership, to which it supposedly defers. After creating Jabhat al-Nusra in 2012, Mr Baghdadi claimed this year to have merged it with ISIS. But Muhammad al-Golani, Jabhat al-Nusra’s leader, disagreed—and was backed by Ayman al-Zawahiri, al-Qaeda’s overall chief. ISIS and Mr Baghdadi rejected his ruling.

Al-Qaeda’s central leadership has long found the brutality of ISIS counter-productive, in Iraq as in Syria. Its bombs in Iraq often cause mass casualties among civilians, including Sunnis. While Jabhat al-Nusra is treading more carefully with Syrians, ISIS bans smoking, harasses unveiled women and metes out the harshest of punishments, including beheadings, in the areas it controls. In May it summarily executed three members of the Alawite sect, a Shia offshoot to which the Assad family belongs, in Deir ez-Zor. It has even opened fire on Syrian civilians protesting against its behaviour.

Still, ISIS is now the most feted group on jihadist online forums, where prominent scholars have called on people to pledge the baya, or oath of allegiance, to Mr Baghdadi. But ISIS comes up against big obstacles in Syria, as it has done in Iraq. It faces growing criticism from locals who say they do not wish to fight against one regime, only to be oppressed and humiliated by another bunch of criminals. In Iraq, when al-Qaeda-linked groups overreached themselves, they provoked a successful sahwa, or uprising, by Sunni tribes backed by foreign money and arms. The same could happen to ISIS in Syria.