The current French military intervention in Mali has reached its final stages, according to French defense officials. But the crisis is far from over in the West African country of 16 million, where regional forces will soon take over to address ongoing security challenges.

“The first phase is nearly finished, and that was reconquering Mali on behalf of the Malian government and the international community,” Adm. Edouard Guillard, France’s chief of the defense staff, told Reuters on Friday. “The second phase is handing over to the African forces, and this is being done.”

The French made rapid gains following their sudden intervention in Mali, which began on Jan. 11 at the request of the Malian government. At that point, Islamist insurgents controlled the country’s northern region, an area about the size of Texas.

The crisis began in late 2011 when a militant organization made up of Tuaregs -- a largely nomadic ethnic group hailing from the Sahel -- made unprecedented inroads into northern Mali in pursuit of an independent state. They were helped at first by an overflow of weapons from the Libyan revolution of 2011, and later by a military coup in the Malian capital city of Bamako in March of last year.

Islamists linked to al Qaeda followed on the Tuaregs’ heels, eventually overtaking or else absorbing their predecessors and enforcing a harsh version of Shariah, or Islamic law, on communities that had practiced a more moderate form of Islam.

The Islamist insurgents were far from monolithic. Some identified themselves as members of Al Qaeda in the Islamic Maghreb, or AQIM. Others -- including many Tuaregs -- were part of an organization called Ansar Dine. Still others were involved in the Movement for Unity and Jihad and West Africa, or Mujwa, which absorbed numerous foreign fighters.

Many members of the original Tuareg insurgent group, a largely secular bloc called the National Movement for the Liberation of Azawad, or MNLA in French, eventually sided with French forces.

The French intervention was generally successful. Islamist militants no longer control the northern cities of Timbuktu, Kidal, and Gao -- but that doesn’t mean they have ceased operations in the region.

On Thursday, insurgents launched an attack against French and Malian troops in Gao and a car bomb killed at least two people in Kidal. On Friday, Tuareg separatists set off two car bombs that killed at least five in the town of In Khalil, near the Algerian border.

It is a clear indication that, despite the superior military capabilities of the French forces, the insurgents still enjoy some distinct advantages: a familiarity with the rugged landscape of the Sahel, a shadowy network of alliances and reinforcements, and an ability to blend in with civilians to escape detection.

Paris officials admit that sporadic attacks may continue even after the intervention is over, noting that Malian and other African troops will have to meet those challenges after French troops are gone.

More than 4,000 French soldiers are still on the ground. African troops in Mali currently number around 3,800, but their equipment, training, and level of coordination pale in comparison to their French counterparts.

The endgame in Mali will be a challenging one. Quashing militant activities is only the beginning -- the country is also enduring a dire humanitarian crisis. Livelihoods have been disrupted in a country that was already facing drought-induced food shortages and endemic poverty. On top of that, hundreds of thousands of Malians have been displaced by the insurgency and counterinsurgency.

Meanwhile, the Malian government has never recovered from the coup last year, despite the establishment of a transitional administration. The mutineers still wield considerable influence in Bamako. And despite years of military partnership with the U.S. and other Western powers, the national army suffers from inadequate training and a lack of cohesion.

Then there are ethnic divisions. Stability is threatened by a long history of animosity between black Malians and the lighter-skinned descendants of Arabs and Berbers, many of whom make their homes in northern communities. As the French intervention winds down, clashes between members of these two groups have already been documented.

It is likely that the West will still play a key role in the region even after the French intervention officially ends. Some British and French troops will stay on to help train the Malian army, and the U.S. is in the process of establishing a base for surveillance drones in the neighboring country of Niger.

While these military-focused initiatives will help African troops contain the insurgency for now, political stability will be the key to long-term peace -- and considering the many fault lines that still threaten societal order in Mali, that’s a very tall order.