DAKAR (Reuters) - When Mali's Tuareg nomads launched a rebellion in January, many in Africa thought it would be just the latest in a long line of desert uprisings to be swiftly placated with offers of cash and jobs.
Some optimists mused that the indigo-turbaned northerners might even take on the local arm of al Qaeda, which was plying a disruptive trade in Western hostages and trafficked goods.
But instead, the Tuaregs' struggle for an independent homeland has been hijacked by better-armed Islamists from Mali and abroad, creating a safe haven for militants in the Sahara that is already being compared to similar bastions elsewhere.
"We are in an early stage of Afghanistan and Somalia. There is no doubt in my mind," said Ahmedou Ould-Abdallah, a Mauritanian diplomat who has been a United Nations envoy in both west Africa and Somalia.
Mali is still a long way from the Taliban-ruled Afghanistan of the 1990s from which Osama bin Laden's then little-known al Qaeda readied the September 11 attacks on U.S. targets in 2001.
And the desert trade in hostages, narcotics and other goods has yet to reach the scale of the piracy off the east coast of Somalia, estimated to cost the global economy $7 billion a year.
But Ould-Abdallah and a swelling chorus of security experts point to an influx of foreign fighters, a debilitating rivalry between neighboring states, and steady flow of illicit funds as making Mali and the wider Saharan zone the next one to watch.
In former colonial power France, the new defense minister warned last week of a "west African Afghanistan" in Mali.
The rebels' seizure of three major airstrips in the north - near the towns of Gao, Timbuktu and Tessalit - means that, in the absence of a functioning Malian air force, they can ferry in everything from drugs and weapons to yet more foreign fighters.
While some believe the threat can be contained within the area, others think it will stretch further afield. Among the latter is the African Union, whose chairman last week called for the United Nations to back a regional force to intervene.
"All the way across Europe, there is growing concern," one Western diplomat working in the region told Reuters.
"We have to recognize that it cannot be contained in northern Mali or even west Africa."
The Sahara, and the Sahel scrubland which skirts it to the south, had already been inching up the global security agenda in recent years as Al Qaeda in the Islamic Maghreb, a franchise of the militant network, became more active in the zone after a crackdown by authorities in Algeria, where AQIM has its roots.
The overspill of arms and fighters from last year's Libyan war into an already fragile neighborhood added a new layer of insecurity even before the rebellion in northern Mali.
When Malian government troops were routed in early April, a variety of groups entered the fray, in many cases appearing openly in the main towns for the first time. They included men declaring loyalty to al Qaeda and to AQIM splinter groups like the little-known MUJWA, as well as some members of Nigeria's Islamist militant organization Boko Haram.
"It has become a cool place for jihadis from the region," said one U.S. official with knowledge of the situation, adding that gunmen were also coming in to northern Mali from Tunisia, Morocco and Mauritania.
Early developments in the rebellion focused on the secular National Movement for the Liberation of Azawad (MNLA), whose slick, European-based PR machine and Tuareg sympathizers hailed a series of small victories notched up against the army as they sought to carve a state they call Azawad out of the desert.
But the complex nature of the uprising emerged after a coup on March 22 in the Malian capital Bamako, far to the south, by soldiers angry at the government's failure to contain the revolt. Their coup, however, merely emboldened the rebels to make a lightning advance.
As rebel forces took major towns such as the ancient city of Timbuktu, it became clear that MNLA fighters were operating alongside a newly formed Islamist movement known as Ansar Dine, whose stated goal is to impose Islamic law, sharia, across Mali.
Ansar Dine is run by Iyad Ag Ghali - described in a leaked U.S. diplomatic cable from as "northern Mali's undisputed power broker". In two decades navigating northern Mali's tribal and political circles, Ag Ghali led two previous Tuareg rebellions, had a stint as a diplomat in Saudi Arabia and, once back home, acted as an go-between in hostage bargains with al Qaeda cells.
Diplomats in Mali said Ag Ghali formed Ansar Dine, commonly translated as Defenders of Faith, last year after being rebuffed in separate efforts to head both the MNLA and his Ifoghas Tuareg clan: "He lost the tribal line. He lost the rebellion. What does he have left? Religion," said a diplomat based in Bamako.
Alongside the MNLA, Ansar Dine has jointly controlled Mali's north for two months. It was initially welcomed by local people for restoring a semblance of order after three months of violence and disruption. But it is now facing increasing hostility to its efforts to impose sharia on populations with a long history of practicing a more liberal style of Islam.
Girls and boys have been separated in schools. Residents have been whipped for drinking alcohol and smoking and hundreds took to the streets of the town of Gao to protest last month when Islamists there banned soccer and television.
Yet if imposing sharia has won Ag Ghali little popularity, it has been crucial in drawing him closer to AQIM, a group with which he was already familiar - literally, through family connections - and which he now needed for its firepower and the cash it had accumulated after years operating in the area.
Such has been the rapprochement that Ag Ghali is now understood to have an al Qaeda nom de guerre - Abu Fadhil.
"(Ag Ghali) is using religion, but his aim is political," said Mohamed Coulibaly of the Dawa movement, which preaches the same conservative form of Islam as that espoused by Ag Ghali but which rejects violence.
Ansar Dine and AQIM each number around 500 fighters, giving them a combined headcount roughly equal to that of the MNLA and substantial clout in an area the size of Spain with a population of little over a million.
Witnesses say the Islamists are better-resourced and more heavily armed than the Tuareg separatists, however, allowing them to shunt the MNLA aside and take effective control on their own of towns across northern Mali.
The government in the south is laboring with a fragile transition back to civilian rule after the March 22 coup and its army is still licking its wounds after the rebel advance, so Bamako is in no position to take back the north any time soon.
While the government rejects the MNLA's secession, there might have been scope for negotiations on easing poverty in the north that could have provided a platform for resolving the rift in the country. But the marginalization of the secular MNLA by the Islamists makes even that degree of dialogue impossible.
The MNLA now appears to risk tearing itself apart over a proposed power-sharing deal in the north with Ansar Dine - with the latter saying sharia is a non-negotiable part of the deal even as it consolidates its positions on the ground.
Prospects of a solution from outside are equally dim.
Niger, whose capital Niamey is closer to much of the rebel-run zone even than Bamako, is pushing for quick military action to crush the rebels. Yet Algeria, the region's biggest military power, seeks dialogue and is prickly about any suggestion of foreign forces operating in the Sahara.
Such divisions are not new. Sour ties between Algeria and Morocco and longstanding regional frustration with Mali for its perceived laxity in dealing with the security threat on its territory, have hamstrung Western efforts to coordinate a response to the growing AQIM menace to Western interests.
On May 11, in a closed-door U.N. Security Council debate, diplomacy gave way to criticism of the west African states' ECOWAS grouping. According to a U.N. report seen by Reuters, Germany and the United States urged the United Nations to play a bigger role - a move openly supported last week by the region's main former colonial power, France, and by the African Union.
But if calls are growing for U.N.-backed intervention, memories of the disastrous 1993 U.S. foray into Somalia and the difficulties of NATO's decade-old presence in Afghanistan have dampened appetites for putting Western troops on the ground.
While Paris has military bases in Senegal and Ivory Coast together with special forces deployed to the region, France and Washington are so far only ready to provide support roles to an potential African mission to suppress the revolt.
ECOWAS has said for weeks that it has a standby force of thousands ready to deploy to Mali but the mission is short of any clear planning and mandate. It is meant to be invited in by authorities in Bamako but wrangling there between politicians and soldiers who led the coup has blocked any coherent policy.
There are questions, too, over the effectiveness of a west African force, over the cost, put by one peacekeeping source at over $200 million, and on whether foreign troops might just further poison relations among Mali's rival groups.
Others suggest it is still not too late to use deep-running tribal ties to detach the MNLA separatists, and some Tuaregs who have joined Ansar Dine, from hardline and foreign Islamists in the hope of starting negotiations with those more ready to talk.
"If a force goes in now, before there have been any talks, it risks pushing the moderates towards the extremists," the Western diplomat in the region said.
However, Todd Moss, once a senior U.S. diplomat working on Africa and now vice-president at the Center for Global Development, said a protracted stalemate would make a military effort more likely - possibly relying primarily on Western air power rather than a regional force moving in on the ground.
"Not ECOWAS ... rather a French and US counter-terrorism campaign from the sky," Moss suggested. "Western policymakers will absolutely not allow a jihadist safe haven."
Editing by Mark John and Alastair Macdonald