Beirut: The mass beheadings of Egyptian Christians by militants in Libya linked to Daesh have thrown a spotlight on the threat the extremists pose beyond their heartland in Syria and Iraq. Militants in several countries - including Libya, Egypt, Algeria, Yemen and Saudi Arabia - have pledged allegiance to Daesh leader Abu Bakr Al Baghdadi, although the degree of coordination and operational planning between Daesh leadership and the group’s affiliates remains unclear.

Here’s a look at Daesh’s reach across North Africa:

LIBYA

- The country has been in free-fall since the end of the civil war that ousted longtime dictator Muammar Gaddafi in 2011. Libya’s elected government has relocated to the far eastern part of the country, while a loose alliance of militias have set up a rival government in the capital, Tripoli. Fighting between government forces and Islamist militias rages in the second largest city of Benghazi. Hundreds of thousands of people have been displaced, embassies have shuttered and diplomats have fled the country, along with hundreds of thousands of foreign laborers, many of them Egyptian.

This chaos has proven fertile ground for Daesh, which has received pledges of allegiance from several extremist factions in Libya. Daesh-affiliated groups divide the vast, oil-rich country of 6 million people into three regions: Tripoli, Barqa or Cyrenaica in the east, and Fazzan in the south. The interior minister of Libya’s elected government, Omar Al Sinki, has said that Al Baghdadi appointed a Tunisian named Abu Talha to lead the Daesh faction in Tripoli. Al Sinki also has said that the bulk of Daesh militants in Libya are Tunisian and Yemeni.

According to postings on militant web forums, groups claiming allegiance to Daesh control the coastal cities of Sirte and Derna, and have a presence in at least three other locales, including Tripoli and Benghazi, the birthplace of Libya’s 2011 uprising. Egyptian warplanes struck suspected Daesh targets in Derna on Monday, following the killing of the 21 Coptic Christians.

Militants claiming allegiance to Daesh have battled Libyan troops in Benghazi, often using suicide bombers. Last month, fighters loyal to Daesh claimed responsibility for a deadly and complex attack on a hotel in Tripoli.

EGYPT

- The Egyptian government is battling a burgeoning insurgency centered in the strategic Sinai Peninsula, which borders Israel and the Gaza Strip. North Sinai has seen a spike in militant attacks against security forces, particularly after the military ousted Islamist President Mohammad Mursi in 2013. The area has been under a dusk-to-dawn curfew since October.

Some militants there have declared their allegiance to Daesh, with one such group calling itself Sinai Province of Daesh. It claimed responsibility for a sophisticated and multi-pronged set of attacks late last month on Egyptian military positions that killed 32 troops. Last October, another major attack killed more than 30 troops, and last month Sinai Province militants claimed responsibility for the capture and killing of a police captain.

Sinai Province, which grew out of the Al Qaida-inspired group known as Ansar Beit Al Maqdis, has not attacked civilians directly, although some have died as a result of its violence. Extremist groups in Sinai rely heavily on weapons smuggled across the porous desert border with Libya. Despite more than a year of massive military operations in northern Sinai, which have included home demolitions along the frontier, the government has not been able to stem a daily stream of militant attacks there.

ALGERIA AND TUNISIA

- Daesh’s successes in Syria have inspired a number of radical Islamist groups to splinter away from the dominant North African branch of Al Qaida, known as AQIM, and declare allegiance to Al Baghdadi. Most prominent has been the Algerian Soldiers of the Caliphate (Jund Al Khilafah) led by a veteran Al Qaida commander that kidnapped French hiker Herve Gourdel in September and then put out a video showing his beheading. Algeria unleashed a massive operation against the group last fall, and most of its known members have since been captured or killed.

In Tunisia, the radical Oqba ibn Nafaa brigade has long had good relations with AQIM, but has also issued statements in support of Daesh. More importantly, however, there has been a steady flow of Tunisian recruits to Al Baghdadi’s group, most passing through Libya for training. Increasingly, they have stayed there and fought with an alliance of Islamist militias as well as Daesh, and report have emerged of several Tunisian “martyrs.”

WHAT THREAT DOES THIS POSE TO EUROPE?

- European states have looked on with growing alarm as militants with links to Daesh have risen in prominence across North Africa. Italy, which is just 800 kilometers (500 miles) from the Libyan coast, has been perhaps the most concerned by the extremists’ surge in Libya. Italian authorities fear that Islamic militants might slip into the country on Libya-based smuggling boats crowded with refugees and migrants from Syria, Africa and elsewhere. Italian Premier Matteo Renzi has even gone so far as to press for UN intervention to stem the violence in Libya. On Sunday, Italy repatriated by sea its personnel from its Tripoli embassy and advised other Italians, many of whom work in oil or construction businesses, to leave Libya.

Fears about the Daesh threat are also running high in France, which has seen more people join extremists in Syria and Iraq than any other European country. Some 1,400 French citizens or residents have been identified as linked to militant networks in recent years, hundreds of whom have traveled to Syria or Iraq, Prime Minister Manuel Valls said last week. French authorities are particularly concerned that Daesh-linked extremists will stage attacks at home, and are trying to toughen counterterrorism laws and tools to stop them.

A Frenchman who killed four people at a Paris kosher market last month, Amedy Coulibaly, claimed ties to Daesh, and the group said last week that Coulibaly’s girlfriend has joined Daesh in Syria. Another Frenchman with ties to Daesh, Mehdi Nemmouche, is the chief suspect in a deadly attack on the Brussels Jewish Museum. Daesh in recent months has started a monthly online magazine in French and have released multiple online videos in French urging French Muslims to join the fight in the Mideast - and if they can’t, to stage attacks at home.