THE massacre in Paris on November 13th has been met with martial rhetoric and muscle-flexing by world leaders. Barack Obama and François Hollande have vowed to “destroy” Islamic State (IS). France and Russia have intensified their air strikes on the group. The fight, for now, is focused on Iraq and Syria, where IS controls a large swathe of territory. But eliminating that stronghold may just be a start. The group has affiliates, some self-proclaimed, across the globe, from Algeria to the Philippines.

Many of the official branches have only loose ties to the central leadership. Most find it difficult to hold territory, but some are quite potent. The civil war in Yemen, long home to a deadly al-Qaeda franchise, has allowed a branch of IS to emerge from the country’s ungoverned spaces to attack government, military and religious targets. An affiliate in Egypt, operating in the rugged Sinai peninsula, has tormented the government of Abdel-Fattah al-Sisi and claimed responsibility for the bombing of a Russian passenger jet on October 31st that killed all 224 people on board.

But perhaps the most worrisome offshoot of the caliphate is made up of its three “provinces” in Libya, where it is estimated to have some 3,000 fighters. The group has gained ground there amid the chaos of a civil war between rival governments, and their allied militias, in the east and west of the country. State structures do not exist to counter its rise. Weapons, from rifles to rockets, abound. And the borders are porous. These are “the perfect conditions for a terrorist campaign”, writes Wolfgang Pusztai, a former Austrian defence attaché to Libya.

As in Syria, defeating IS in Libya is no one’s priority; both sides in the civil war prioritise attacks on each other. The jihadist group’s advance has been largely opportunistic, writes Frederic Wehrey of the Carnegie Endowment for International Peace, a think-tank. It has taken advantage of “the fissures, distraction, and incapacity of rival factions.” Much as it did in Syria, IS has tried to steal members and lure recruits by outdoing other Islamist groups in its radicalism. This has not always worked. After IS fighters took over Derna, a small port in the east, and instituted their savage brand of justice, they faced a backlash and were ultimately pushed out of the city by a coalition that included other jihadists.

More recently, though, the group has consolidated control of parts of central Libya, including the city of Sirte and much of the coastal area to the east, according to the United Nations. Other IS militants are now fighting for a foothold in Benghazi, a city divided between the eastern military, militias and extremist groups. Those battling IS say they have seen an influx of foreigners in the group’s ranks. Many come from neighbouring Tunisia, Algeria and Egypt. As pressure on IS mounts in Iraq and Syria, it appears some recruits are being redirected to Libya, which has become a jihadist hub.

The advance of IS in Libya is particularly troubling for Europe, which sits some 400km away across the Mediterranean Sea. “In Libya there is the perfect mix ready to explode and in case it explodes, it will explode just at the gates of Europe,” said Federica Mogherini, the European Union’s foreign-affairs boss, earlier this year. The presence of IS on the coast has heightened concerns that terrorists may mix with war-fleeing migrants on boats bound for Europe.

But analysts say those fears are overblown, not least because IS does not control the main embarkation points. The group poses a greater threat to neighbouring countries, which worry that Islamic militants, foreign or home-grown, will find inspiration, training and refuge in Libya. The jihadists who carried out two deadly attacks on foreign tourists in Tunisia this year are said to have trained in Libyan camps. The Tunisian authorities claim to have foiled another big attack, dreamed up in Libya and Syria, this month.

Nevertheless, officials in the West are mulling aggressive action against IS in Libya—and taking some. On November 13th an American air strike is thought to have killed the group’s leader, Abu Nabil al-Anbari, an Iraqi said to be in direct contact with the group’s central command in Syria. The strike, planned before the massacre in Paris, was the first time that America had hit IS outside Iraq and Syria. An American strike that took place earlier in the year in Libya was targeted not at IS but al-Qaeda: it killed Mokhtar Belmokhtar, one of the group’s leaders.

IS has made many enemies in Libya, which may eventually be its undoing. Its attempts to expand have put it into conflict with tribes and militias that are willing to fight back. It has also been prevented from acquiring any of the country’s vast energy resources. Most Libyans are Sunni, so the group cannot prey on sectarian tensions as it has done elsewhere. And a hit to its brand in Iraq and Syria may make it less popular abroad. But as long as Libya is consumed by chaos, the jihadists of IS are likely to endure.