The Libya connection in the May 22 Manchester suicide bombing and the May 26 attack on Coptic Christians in Egypt has shed light on the threat posed by jihadist groups that have taken advantage of lawlessness in the troubled North African nation to put down roots, recruit fighters and export violence.

Libya has been embroiled in violence since a 2011 uprising that toppled and killed long-time dictator Moammar Gaddafi. Libya, a country of about 6.4 million people, has a largely tribal society and suffers from weak central control. The country has a long history of exporting extremists. Libyans fought in Afghanistan against Soviet forces in the 1980s, with several veterans taking up key roles in al-Qaida in the 1990s.

Libyan jihadists were not, however, domestically successful. But due to the increasingly chaotic state of the country, Libya has become a “hotbed” of jihadi activism, although experts say the situation is highly complicated and warn against exaggerating the strength of militant groups there.

The oil-rich country once had one of the highest standards of living in Africa, with free healthcare and education, but six years on from the uprising, it is facing a deep financial crisis. With youth unemployment approaching 40%, it comes as no surprise that many of its estimated 250,000-350,000 armed men have fallen in with radical groups.

ISIS has been forced out of the urban centers on the Mediterranean coast it once controlled, but it still has a presence in Tripoli and other centers, and it has fighters scattered about in shifting desert camps.

ISIS has reportedly absorbed other armed groups, most notably elements of Ansar al-Sharia, a radical Islamist group that was part of the loose alliance of rebels that rose against Gaddafi

ISIS has reportedly absorbed other armed groups, most notably elements of Ansar al-Sharia, a radical Islamist group that was part of the loose alliance of rebels that rose against Gaddafi. Moreover, Al-Qaida also uses the remote south of Libya as a rear base for planning and logistics. Jihadists operate throughout the country, particularly in the remote south and in the east. They have the ability to carry out hit-and-run operations across Libya, most probably through a network of cells, including in the capital Tripoli. Notably, ISIS badly needs Libya for its operations in North Africa – to deploy its paramilitary brigades, to organize its terrorist networks and, most importantly, to prepare its political pawns to take power. For ISIS, Libya provides an opportunity not only to extend the caliphate, but to do so far away from coalition airstrikes in Syria and Iraq. Jihadists also see Libya as an alternative base they can use if they lose strongholds in Syria and Iraq.

It is important to understand the factors that helped the jihadist groups to strengthen themselves. The weakness of the central government, which fractured into two rival authorities in 2014 before being joined by a third UN-backed administration in 2016, led directly to the breakdown of the rule of law, security vacuums, corruption, and economic stagnation. Factors such as porous borders, the absence of a unified security force, an abundance of loose weapons, and the opportunity to smuggle oil and humans to generate revenue have combined to create an ideal operational environment for jihadists.

The time to save Libya is now. Failure to do so will have tragic consequences for Libya and its neighbors. The United States should increase the number of airstrikes targeting jihadists and work closely with the Libyan forces currently fighting terrorist groups such as General Khalifa Haftar’s Libyan National Army.

The United States and its allies must maintain pressure on the ISIS Libya network and concurrently support Libya’s efforts to re-establish a legitimate and unified government. Stabilizing Libya would undoubtedly help to fight religious extremism in West Africa by cutting the lifeline of the lethal Boko Haram, which is active throughout West Africa, and impede al-Qaeda, which is threatening the Sahel countries of Burkina Faso, Mali and Niger. The international community and neighboring countries must facilitate the formation of a unified central government in the country that can provide a foundation for counter-terrorism efforts. The unified central government should disarm all paramilitary groups by persuasion, incentive or sheer force and make, by law, bearing arms strictly illegal. It should offer the militias the opportunity to operate under the rule of law by integrating with the army and police force.

International economic institutions will need to help Libya restructure its economy, especially now that the price of oil has fallen steeply. Libya has the wealth, educated populace and strategic location needed to succeed. Libya is truly the linchpin of any comprehensive strategy to bring stability to the region; therefore, every stakeholder should contribute to the stabilization of this war-torn nation.