When France's lightning offensive broke al-Qaeda's grip on northern Mali in 2013, many of the country's people dared to hope they would be free of terrorism. During those heady weeks, the Tricolour flew from mud homes in villages on the fringe of the Sahara. One by one, the regional capitals in northern Mali - Timbuktu, Gao and Kidal - were freed by their old colonial power.
This expedition, known as Operation Serval, reversed one of al-Qaeda's most audacious acts of conquest. For the previous 10 months, "al-Qaeda in the Islamic Maghreb" (AQIM) and its local allies had controlled over 300,000 square miles of Mali, no less than two thirds of the country. Within their domain lay airports, military bases, arms dumps and 1.3?million people.
A modest French force, never more than 4,000 strong, changed the course of history in a country with a population of 15?million.
But the attack on the Radisson hotel in Mali's capital, Bamako, claimed by the al-Qaeda-linked Al-Mourabitoun group led by the one-eyed extremist Mokhtar Belmokhtar, demonstrates that Operation Serval, for all its skill, did not break the back of terrorism. Nor did France's intervention address the underlying reasons why northern Mali had fallen into AQIM's hands.
Instead, the assault on the hotel shows that the terrorists have changed their tactics. Thanks to France, they no longer control large expanses of territory or govern populations, so they do not fight like a conventional army.
They have adopted the classic methods of terrorism, striking soft targets with the aim of killing civilians, particularly French citizens. Yesterday's assault was one of their more ambitious operations; occasionally, they do nothing more than toss hand grenades into crowded places, as they did in a bar in Bamako in March, killing five. The aim is to demonstrate their presence, spread fear and kill the vulnerable.
This vast country represents an unhappy union between the black African south and the Saharan north, inhabited largely by the Tuaregs, a Berber-speaking people. The Tuareg have always resented being ruled by the south, where a corrupt elite in Bamako soak up the nation's wealth. For years, Tuareg rebels fought for a state of their own. Their struggle was aided by political turmoil in Bamako, where weak civilian governments alternated with periods of military rule.
All this created fertile territory for AQIM to exploit. The situation was made still worse by the fact that Mali has never built an effective army in 55 years of independence from French rule. Even today, Mali is still incapable of defending itself. The army has been retrained and re-equipped, but it possesses only 4,000 troops, leaving the country's security in the hands of a 10,000-strong UN peacekeeping force along with 450 French troops.
And the north-south divide has not been healed, nor has any lasting settlement been reached with the Tuareg.
The country is still beholden to outsiders and, as events in Bamako have just demonstrated, acutely vulnerable to the worst of terrorism.