After 11 years spent waging war on terror in Afghanistan and Iraq, almost $1.5 trillion in direct costs and hundreds of thousands of lives lost, the western public feels it has learned a hard lesson. It is more than ever convinced even the best-intentioned intervention is bound to bog its armies down in endless wars fighting invisible enemies to help ungrateful locals.
Echoes of Afghanistan rang loudly this month when French forces swooped down on advancing columns of Islamists threatening the Saharan state of Mali. They were heard again, a few days later, when a unit of gun-toting jihadists from the Signed-in-Blood Battalion seized a gas plant and slaughtered dozens of foreigners in next-door Algeria, more dead than in any single Islamist terror attack since 2002.
Here, it seemed, was the next front of the global war on terror and also a desert quagmire for western leaders.
All wars are different, though. The lessons from one need not map neatly onto the next. Looking at the arc of instability, stretching from Somalia and Sudan in the east through Chad to Mali in the west, as if it were simply another Iraq or Afghanistan, is misleading.
It is also harmful if it discourages outsiders from helping defuse conflicts. Though intervention always holds dangers, in Africa it need not be so long as in Baghdad and Kabul, nor so hopeless.
The origins of the conflict are not, primarily, either regional or global, but local. Since time immemorial, lawlessness and violence have had a toehold in and around the vast Sahara Desert and the terrain eastward across to Somalia in the Horn of Africa.
The anarchy, however, has worsened, especially since the fall of Libya's Moammar Gadhafi in 2011, when arms flooded across the region's porous borders. Hostage-taking, cash from ransoms, smuggling, drug-trafficking and brigandage have bolstered an array of gang leaders. Some of them, waving the banner of Islam, have seized on legitimate local grievances fuelled by poverty, discrimination and the mismanagement of corrupt governments.
In northern Nigeria, an extreme Islamist group calling itself Boko Haram ("Western Teachings Are Sinful") recruits ill-educated, jobless and angry Muslim youngsters to wage a campaign of violence and murder.
In Mali, the nomadic Tuareg in the north have long been marginalized. The jihadists latched onto an ethnic revolt, sweeping its leaders aside.
In Ethiopia and Kenya, jihadists have cynically widened old fault lines between Christians and Muslims, who in the past had cohabited peacefully.
Many of these groups give themselves a global gloss. The jihadists who attacked the Algerian gas plant came from such places as Tunisia, Mali and Niger, and the Algerian authorities say they even included at least one Canadian. North African Islamists look for inspiration to global jihadists such as al-Qaida. Some get money from sponsors in Saudi Arabia and other sources in the oil-rich Persian Gulf.
A loose fraternity echoes the message of hostility toward the West and its friends in Africa. As al-Qaida comes under pressure in the borderlands of Afghanistan and Pakistan and in parts of Somalia and Yemen, some of its people, seeking a new refuge, may wash up in the Sahara region.
Despite these links, though, the direct threat is overwhelmingly local. Ask the townspeople of Timbuktu, who suddenly fell under the hand-chopping puritanism of strict Shariah law, or the victims of a foreign-trained bomb-maker in Nigeria, or the people of Somalia who are only now, with the Shabab militia in retreat, beginning to put their lives back together.
Global jihad radicalizes young Muslims, though, lending their local grievances a dangerous new edge. Poorly trained security services feed the insurgency with their brutality. As in Kenya, where Somali refugees have fed tensions between Christians and Muslims, conflict in one country tends to spill over next door. Through the years, a radicalized, armed and trained Islamist insurgency could do immense damage in a fragile part of the world.
For those who have learned to doubt the wisdom of most intervention, this argument points to a simple conclusion: Keep out. Even so, for a host of reasons, what happens in the Sahara is also the world's business.
The region is a big producer of oil and natural gas. Shutting foreign businesses out of northern Africa would be a real loss: One reason French President Franßois Hollande sent troops into Mali was to protect at least 6,000 French citizens living there.
Somalia's lawlessness led to piracy across the Indian Ocean. North African jihadists wouldn't be capable of mounting a campaign of terror in Europe or America at present, but that might change if they controlled the resources of an entire country. Better to keep them stuck in the desert.
Beyond self-interest is the fact that short, sharp intervention can lighten the misery of millions of people. French paratroops helped end civil strife in C¥te d'Ivoire in 2011. A few thousand British soldiers, having secured Sierra Leone's capital, Freetown, helped end a dreadful civil war in 2000. So long as African troops and a sustained program of development are available for deployment when the battle has been won, intervention can work.
The Sahara will become stable only when it becomes more prosperous. Much of the rest of Africa is starting to enjoy that prospect. Most of Africa's growing number of Muslims are hostile to jihad. Western governments would be making a grave mistake if they invoked the difficulties of intervention as an excuse for abandoning them now.