SOON after it attacked America on September 11th 2001, al-Qaeda issued a book by its co-founder, Ayman al-Zawahiri, setting out a grand strategy. “Knights under the Prophet’s Banner” explained that striking America, not local regimes, would galvanise Muslims everywhere; jihadists had to cleave “to the masses” and needed a “base in the heart of the Muslim world” to achieve eventual success.

In the event, al-Qaeda was chased from Afghanistan and dispersed by American forces, which eventually killed its leader, Osama bin Laden. In Iraq, the jihadists were nearly wiped out as the masses turned against them, for a time. And with the subsequent collapse of Syria and Iraq, al-Qaeda was eclipsed by its rebellious progeny, Islamic State (IS), which declared a caliphate in 2014 and has inspired jihadists—and earned the enmity of everyone else—ever since.

Yet the threat from al-Qaeda never disappeared. Its central leadership remains committed to attacking the West; its regional branches are active; and Mr Zawahiri remains at large. The IS caliphate looks likely to be dismantled as American-backed forces close on its strongholds of Raqqa and Mosul. By contrast, Mr Zawahiri’s dream of a secure base for al-Qaeda in the Arab world may be turning into reality. So, at least, fear Western governments.

Al-Qaeda’s Syrian branch, Jabhat al-Nusra (“The Support Front”), has taken a central role in the fight against Bashar al-Assad’s regime. Mr Zawahiri’s deputy, Abu Khayr al-Masri, released by Iran in a prisoner swap last year, has moved to Syria with several other senior al-Qaeda figures, Western officials say. There is talk that al-Qaeda may soon declare an Islamic “emirate” (one notch down from a caliphate).

Such worries go some way to explaining the terms of the latest ceasefire in Syria negotiated by America and Russia. Its central bargain is this: if the Russians restrain Mr Assad and allow humanitarian supplies into besieged areas held by rebels, America will join Russia in targeting Jabhat al-Nusra (as well as IS). The first such joint operations since the end of the cold war will start if the ceasefire holds for a week after coming into force on September 12th.

John Kerry, the American secretary of state, and his Russian counterpart, Sergei Lavrov, did not agree on a future government for Syria, let alone a timetable for Mr Assad to step down. But Mr Kerry rejects the notion that America has, in effect, bowed to Russia and its intervention to prop up Mr Assad: “Going after Nusra is not a concession to anybody,” he says. “It is profoundly in the interests of the United States to target al-Qaeda.”

But America risks being seen as doing Mr Assad’s bidding. “This is a conspiracy against the Syrian people to bring their revolution to an end,” says Mostafa Mahamed, the Nusra front’s English-language spokesman. “We are one of the strongest forces fighting the regime, and the world knows it.”

On the eve of the Kerry-Lavrov deal, someone appears to have made a down-payment: an unknown aircraft struck a meeting of rebel commanders, killing Abu Omar Saraqib, a prominent Nusra figure. Whoever carried it out, rebels of all persuasions mourned his death. “Saraqib was the engineer of the military operations of one of the strongest rebel alliances in Syria. His death will weaken the revolution,” says Zakaria Malahfeji of Fastaqim Kama Umirt, a rebel faction in Aleppo that receives military support from America. Such sentiments say much about the failures of American policy in Syria, and the success of al-Qaeda’s belated pragmatism.

Think global, act local

Jabhat al-Nusra has played a long game. Like IS, its roots lie in al-Qaeda’s jihad against American troops (and increasingly against Shias) in Iraq; both later grew in Syria’s blood-soaked soil. But whereas IS doubled down on its anti-Shia sectarianism and the “management of savagery”, Jabhat al-Nusra sought to learn from the excesses of Iraq. IS favours ostentatious brutality, the extermination of rivals and the imposition of strict sharia rules. It took the fast lane to the caliphate, and calls on supporters worldwide to attack the West by whatever means. Jabhat al-Nusra, by contrast, seeks to win the respect of brutalised Sunnis by fighting Mr Assad; sharia strictures have, for the most part, been light; the caliphate is a long-term objective, to be established when conditions are ripe. Jabhat al-Nusra has formed alliances with more moderate groups; and it has focused on the fight in Syria rather than global jihad.

In July Jabhat al-Nusra declared it had severed “external” ties with al-Qaeda, and rebranded itself Jabhat Fatah al-Sham (Front for the Conquest of the Levant, or JFS). Western counter-terrorism experts tend to dismiss the move as cosmetic. But in Syria it proved contentious enough that some hardline jihadists left. JFS now seeks a full merger with other rebel groups; purists think that its global ambition will be diluted by the nationalist Syrian rebel agenda. David Petraeus, a former CIA chief, has suggested talking to its “reconcilable” elements. Some are even pushing Staffan de Mistura, the UN special envoy to Syria, to start putting out feelers to the front.

“Al-Nusra is still an integral part of al-Qaeda despite the name change. The danger is that they are acquiring popular support. If it continues to grow then it could become a genuine mass movement,” says Charles Lister of the Brookings Institution, an American think-tank. “With a large enough majority behind them they could establish an emirate, a kind of protected territorial base on the borders of Europe that the international community would find very hard to root out.”

There is little evidence so far that the group has sought to carry out attacks against the West. Indeed its leader, Abu Muhammad al-Julani, says Mr Zawahiri has expressly forbidden him from doing so. But counter-terrorism officials worry that it is just a matter of time. America has been targeting what it calls the “Khorasan group” within the front, a nucleus of al-Qaeda figures who have moved to Syria and were allegedly plotting international attacks. For the most part, though, American bombing has been directed at IS.

The front’s fighters have acted as the shock troops of the Sunni rebellion, especially in northern Syria. Its cadre of suicide-bombers, known as inghimasi, was used with devastating effect to breach the Syrian regime’s lines before rebel assaults. “Al-Nusra’s fighters have become to the opposition what Russian and Syrian jets are to the regime,” says a seasoned observer. Soon after its rebranding, JFS was instrumental in breaking the siege of rebel-held Aleppo. The respite was brief but earned JFS the gratitude of many in the city. Other units have little choice but to work alongside the front. It has attracted many recruits; more than two-thirds of its roughly 7,000 fighters are thought to come from Syria. They see it as a better-trained, better-equipped, more disciplined force that takes greater care of its wounded. It has even drawn fighters from IS. Though Syrian rebel groups are more or less keeping the ceasefire, few will obey America’s order to separate from JFS. They fear that, should fighting resume—as after an abortive ceasefire in February—Mr Assad’s forces will reclaim territory. Many think strikes against JFS would be like “ripping a vital organ from the body of the revolution”, as one Syria-watcher puts it.

The softer side of jihadism

Like IS, the front presents itself as a quasi-government in areas where it is dominant. Its Department of Relief paves roads, repairs electricity lines, pumps water and rebuilds damaged infrastructure. To prevent looting, its police guard marketplaces. It subsidises bread, runs flour mills and bakeries, offers Islamic education, provides health care and ensures rents remain low for families displaced by the fighting. At “family fun days” locals compete in games of tug-of-war and enter raffles to win TVs.

Many regard the front as less corrupt than other rebel factions. By controlling the judicial system, and access to marriage certificates and property deeds, it seeks to settle disputes and steer locals towards its ideology. “They don’t intervene in people’s affairs like before. Even around Idlib, their main stronghold, you can see girls and women not wearing the niqab,” says Sami al-Raj, an activist from Aleppo. “Many people consider it the only rebel group that can protect their property and money. You rarely find robbery in the areas it controls.”

Already in 2013, before the split with IS, Mr Zawahiri was urging moderation on jihadists. Except for some places—such as Afghanistan, Pakistan, Somalia and Saudi Arabia—they should as far as possible avoid clashing with local regimes. They should resist fighting “deviant sects” like Shias, and “avoid meddling” with non-Muslim minorities. The priority should be to strike America “until it bleeds to death both militarily and financially”, he said in a public missive. “Our struggle is a long one and jihad is in need of safe bases and consistent support in terms of men, finances and expertise.”