Why the Sahara is not the 'new Afghanistan'
The brazen attack on a desert gas plant in Algeria last month and the French-led campaign against Islamists in northern Mali have triggered stark warnings in the West of a new front opening in the campaign to combat Islamist extremists but there is a danger of exaggerating the threat, analysts say.
US Secretary of State Hillary Clinton spoke of the need to prevent northern Mali becoming a "safe haven" from which militants could launch attacks against America.
British Prime Minister David Cameron said this "global threat" required a response that would take "years, even decades".
"Just as we had to deal with that in Pakistan and in Afghanistan so the world needs to come together to deal with this threat in North Africa," he said.
But militancy in the Sahara and Sahel, which stretches across the desert regions of Mali, Algeria, Libya, Niger and Mauritania, is tied to local dynamics and plays on local grievances and it would be a mistake to see all of the region's numerous armed groups as always acting in unison.
The only clear parallel with the border area between Afghanistan and Pakistan where the Taliban have flourished, analysts say, is the absence of central governments, which are unable or unwilling to counter extremism.
This is a long-standing problem in northern Mali. It emerged more recently in North African countries that saw Arab Spring uprisings, including Libya and Tunisia, allowing militant groups to gain ground.
"Right now we're not seeing as much an uptick in the strength of these groups as much as we are new areas that they're able to operate in because of the weakening of states," said William Lawrence, North Africa director for International Crisis Group.
"That's the major change in the last two years."
The most prominent militant group in North Africa is al-Qaeda in the Islamic Maghreb (AQIM), formed from the remnants of the Islamist insurgency in Algeria.
Its leaders have increasingly aligned themselves with international jihad (holy war), adopting the al-Qaeda name in 2007.
In the desert over the past ten years they have raised their profile - and tens if not hundreds of millions of dollars in ransom money - by taking westerners hostage.
Robert Fowler, a Canadian former UN diplomat kidnapped in Niger in 2008, has described the professionalism and apparent religious fervour of the men who abducted him.
"Their every act was considered and needed to be justifiable in terms of their chosen path of jihad," he wrote in his book, A Season in Hell.
The kidnappers were led by Mokhtar Belmokhtar, who more recently formed the AQIM splinter group, the Signed-in-Blood Battalion, blamed for January's attack on the Algerian gas plant of In Amenas.
Two other groups, Ansar Dine - dominated by former Tuareg rebels - and the Movement for Unity and Jihad in West Africa (Mujao), took control of northern Mali's major towns and cities following a coup in the capital, Bamako, last March.
They destroyed shrines sacred to Sufi Muslims and applied a radical version of Sharia law, chopping off the hands of thieves, authorising the stoning of adulterers, and forcing women to wear veils.
The Associated Press reported in December that they had set up bases in the desert north of Kidal, using heavy machinery to dig a network of tunnels, trenches and ramparts.
But for many observers, the behaviour of militants across the region is driven more by opportunism than any long-term adherence to a strict ideology.
In northern Mali they have exploited a history of separatism, armed conflict, Islamism and illegal trafficking going back several decades.
Goods smuggled across the Sahel's porous borders include everything from basic foodstuffs to petrol, cigarettes and cocaine.
Local authorities are often involved in such trade, a reason for collusion with smugglers and armed groups.
Many living in the area have complained of economic and political exclusion.
"The key elements were ones of development, poverty, institutional chaos, a power vacuum over this vast area, artificial borders, ethnic tensions," said Imad Mesdoua, a political analyst at Pasco Risk Management.
"The post-colonial structural problems of these countries have yet to be resolved."
Judith Scheele, a social anthropologist at All Souls, Oxford, who has spent time in northern Mali, said gaining access to weapons and raising your social status were also possible incentives for new recruits.
"If you're a young Malian now and you want to kidnap somebody, your best bet is to stick on the al-Qaeda logo, and it doesn't necessarily imply terribly much," she said.
Social life in northern Mali is largely structured on hierarchies derived from descent. Some historically low-status people have recently grown rich through smuggling and trade, and since religious practice is also an important marker, may have joined extremist groups to raise their status.
"This is an area where being connected to any kind of religious movement or family is a way to be socially mobile," Ms Scheele said.
Such allegiances can be confirmed in marriage, as they were in the case of Algerian militants who have settled in northern Mali and married locals.
But they can also change, or be combined with other allegiances.
The same goes for armed groups, which have a record of shifting their goals, splintering, trading with each other, and competing - sometimes encouraged by local intelligence services.
The Islamists formed a broad and loose coalition in northern Mali, but only after they had allied with, and then turned against, the Tuareg separatists of National Movement for the Liberation of Azawad (MNLA).
Ansar Dine is led by the former Tuareg rebel leader, Iyad Ag Ghaly, known for manoeuvring himself into positions of influence under various guises.
Shortly after French forces invaded last month, a faction called the Islamic Movement for Azawad said it was splitting from Ansar Dine, and rejecting "all forms of extremism and terrorism".
The In Amenas attack was widely seen as an attempt by the Signed-in-Blood Battalion to make its mark in Algeria, where the security forces have long had Islamist militants onto the back foot.
Atmane Tazaghart, author of a book on AQIM, says there are an estimated 1,200-1,500 Islamist fighters currently in the Sahel. But he added that it was "hard to distinguish banditry in this region from the jihadi activity".
Against this backdrop of blurred identities and complex motives, William Lawrence of International Crisis Group warned against heavy-handed, indiscriminate intervention to counter the perceived Islamist threat, which might be encouraged by thinking of the Sahel as a "new Afghanistan".
"The only risk in terms of the comparison is of a self-fulfilling prophecy," he said.
"Tactics and methods applied in Afghanistan and Pakistan, if employed in this region, could engender resentment and further radicalisation."