Updated

Deep inside caves, in remote desert bases, in the escarpments and cliff faces of northern Mali, Islamic fighters are burrowing into the earth, erecting a formidable set of defenses to protect what has essentially become Al Qaeda's new country.

They have used the bulldozers, earth movers and Caterpillar machines left behind by fleeing construction crews to dig what residents and local officials describe as an elaborate network of tunnels, trenches, shafts and ramparts. In just one case, inside a cave large enough to drive trucks into, they have stored up to 100 drums of gasoline, guaranteeing their fuel supply in the face of a foreign intervention, according to experts.

Northern Mali is now the biggest territory held by Al Qaeda and its allies. And as the world hesitates, delaying a military intervention, the extremists who seized control of the area earlier this year are preparing for a war they boast will be worse than the decade-old struggle in Afghanistan.

"Al-Qaeda never owned Afghanistan," said former United Nations diplomat Robert Fowler, a Canadian kidnapped and held for 130 days by Al Qaeda's local chapter, whose fighters now control the main cities in the north. "They do own northern Mali."

Al-Qaeda's affiliate in Africa has been a shadowy presence for years in the forests and deserts of Mali, a country hobbled by poverty and a relentless cycle of hunger. In recent months, the terror syndicate and its allies have taken advantage of political instability within the country to push out of their hiding place and into the towns, taking over an enormous territory which they are using to stock arms, train forces and prepare for global jihad.

More On This...

The catalyst for the Islamic fighters was a military coup nine months ago that transformed Mali from a once-stable nation to the failed state it is today. On March 21, disgruntled soldiers invaded the presidential palace. The fall of the nation's democratically elected government at the hands of junior officers destroyed the military's command-and-control structure, creating the vacuum which allowed a mix of rebel groups to move in.

With no clear instructions from their higher-ups, the humiliated soldiers left to defend those towns tore off their uniforms, piled into trucks and beat a retreat as far as Mopti, roughly in the center of Mali. They abandoned everything north of this town to the advancing rebels, handing them an area that stretches over more than 240,000 square miles. It's a territory larger than Texas or France - and it's almost exactly the size of Afghanistan.

Turbaned fighters now control all the major towns in the north, carrying out amputations in public squares like the Taliban did. Just as in Afghanistan, they are flogging women for not covering up. Since taking control of Timbuktu, they have destroyed seven of the 16 mausoleums listed as world heritage sites.

The area under their rule is mostly desert and sparsely populated, but analysts say that due to its size and the hostile nature of the terrain, rooting out the extremists here could prove even more difficult than it did in Afghanistan. Mali's former president has acknowledged, diplomatic cables show, that the country cannot patrol a frontier twice the length of the border between the United States and Mexico.

Al-Qaeda in the Islamic Maghreb, known as AQIM, operates not just in Mali, but in a corridor along much of the northern Sahel. This 4,300-mile long ribbon of land runs across the widest part of Africa, and includes sections of Mauritania, Niger, Algeria, Libya, Burkina Faso and Chad.

"One could come up with a conceivable containment strategy for the Swat Valley," said Africa expert Peter Pham, an adviser to the U.S. military's African command center, referring to the region of Pakistan where the Pakistan Taliban have been based. "There's no containment strategy for the Sahel, which runs from the Atlantic Ocean to the Red Sea."

Earlier this year, the 15 nations in West Africa, including Mali, agreed on a proposal for the military to take back the north, and sought backing from the United Nations. Earlier this month, the Security Council authorized the intervention but imposed certain conditions, including training Mali's military, which is accused of serious human rights abuses since the coup. Diplomats say the intervention will likely not happen before September of 2013.

In the meantime, the Islamists are getting ready, according to elected officials and residents in Kidal, Timbuktu and Gao, including a day laborer hired by  Al Qaeda's local chapter to clear rocks and debris for one of their defenses. They spoke on condition of anonymity out of fear for their safety at the hands of the Islamists, who have previously accused those who speak to reporters of espionage.

The Al Qaeda affiliate, which became part of the terror network in 2006, is one of three Islamist groups in northern Mali. The others are the Movement for the Unity and Jihad in West Africa, or MUJAO, based in Gao, and Ansar Dine, based in Kidal. Analysts agree that there is considerable overlap between the groups, and that all three can be considered sympathizers, even extensions, of Al Qaeda.

The Islamic fighters have stolen equipment from construction companies, including more than $11 million worth from a French company called SOGEA-SATOM, according to Elie Arama, who works with the European Development Fund. The company had been contracted to build a European Union-financed highway in the north between Timbuktu and the village of Goma Coura. An employee of SOGEA-SATOM in Bamako declined to comment.

The official from Kidal said his constituents have reported seeing Islamic fighters with construction equipment riding in convoys behind 4-by-4 trucks draped with their signature black flag. His contacts among the fighters, including friends from secondary school, have told him they have created two bases, around 120 and 180 miles north of Kidal, in the austere, rocky desert.

The first base is occupied by Al Qaeda's local fighters in the hills of Teghergharte, a region the official compared to Afghanistan's Tora Bora.

"The Islamists have dug tunnels, made roads, they've brought in generators, and solar panels in order to have electricity," he said. "They live inside the rocks."

Still further north, near Boghassa, is the second base, created by fighters from Ansar Dine. They too have used seized explosives, bulldozers and sledgehammers to make passages in the hills, he said.

In addition to creating defenses, the fighters are amassing supplies, experts said. A local who was taken by Islamists into a cave in the region of Kidal described an enormous room, where several cars were parked. Along the walls, he counted up to 100 barrels of gasoline, according to the man's testimony to New York-based Human Rights Watch.

In Timbuktu, the fighters are becoming more entrenched with each passing day, warned Mayor Ousmane Halle. Earlier in the year, he said, the Islamists left his city in a hurry after France called for an imminent military intervention. They returned when the U.N. released a report arguing for a more cautious approach.

"At first you could see that they were anxious," said Halle by telephone. "The more the date is pushed back, the more reinforcements they are able to get, the more prepared they become."

In the regional capital of Gao, a young man told The Associated Press that he and several others were offered 10,000 francs a day by Al Qaeda's local commanders (around $20), a rate several times the normal wage, to clear rocks and debris, and dig trenches. The youth said he saw Caterpillars and earth movers inside an Islamist camp at a former Malian military base 4 miles from Gao.

The fighters are piling mountains of sand from the ground along the dirt roads to force cars onto the pavement, where they have checkpoints everywhere, he said. In addition, they are modifying their all-terrain vehicles to mount them with arms.

"On the backs of their cars, it looks like they are mounting pipes," he said, describing a shape he thinks might be a rocket or missile launcher. "They are preparing themselves. Everyone is scared."

A university student from Gao confirmed seeing the modified cars. He said he also saw deep holes dug on the sides of the highway, possibly to give protection to fighters shooting at cars, along with cement barriers with small holes for guns.

In Gao, residents routinely see Moktar Belmoktar, the one-eyed emir of the Al Qaeda-linked cell that grabbed Fowler in 2008. Belmoktar, a native Algerian, traveled to Afghanistan in the 1980s and trained in Osama bin Laden's camp in Jalalabad, according to research by the Jamestown Foundation. His lieutenant Oumar Ould Hamaha, whom Fowler identified as one of his captors, brushed off questions about the tunnels and caves but said the fighters are prepared.

"We consider this land our land. It's an Islamic territory," he said, reached by telephone in an undisclosed location. "Right now our field of operation is Mali. If they bomb us, we are going to hit back everywhere."

He added that the threat of military intervention has helped recruit new fighters, including from Western countries.

In December, two U.S. citizens from Alabama were arrested on terrorism charges, accused of planning to fly to Morocco and travel by land to Mali to wage jihad, or holy war. Two French nationals have also been detained on suspicion of trying to travel to northern Mali to join the Islamists. Hamaha himself said he spent a month in France preaching his fundamentalist version of Islam in Parisian mosques after receiving a visa for all European Union countries in 2001.

Hamaha indicated the Islamists have inherited stores of Russian-made arms from former Malian army bases, as well as from the arsenal of toppled Libyan leader Muammar Qaddafi, a claim that military experts have confirmed.

Those weapons include the SA-7 and SA-2 surface-to-air missiles, according to Hamaha, which can shoot down aircrafts. His claim could not be verified, but Rudolph Atallah, the former counterterrorism director for Africa in the Office of the Secretary of Defense, said it makes sense.

"Gadhafi bought everything under the sun," said Atallah, a retired U.S. Air Force lieutenant colonel, who was a defense attache at the U.S. Embassy in Mali. "His weapons depots were packed with all kinds of stuff, so it's plausible that AQIM now has surface-to-air missiles."

Depending on the model, these missiles can range far enough to bring down planes used by ill-equipped African air forces, although not those used by U.S. and other Western forces, he said. There is significant disagreement in the international community on whether Western countries will carry out the planned bombardments.

The Islamists' recent advances draw on Al Qaeda in the Islamic Maghreb's near decade of experience in Mali's northern desert, where Fowler and his fellow U.N. colleague were held captive for four months in 2008, an experience he recounts in his recent book, "A Season in Hell."

Originally from Algeria, the fighters fled across the border into Mali in 2003, after kidnapping 32 European tourists. Over the next decade, they used the country's vast northern desert to hold French, Spanish, Swiss, German, British, Austrian, Italian and Canadian hostages, raising an estimated $89 million in ransom payments, according to Stratfor, a global intelligence company.

During this time, they also established relationships with local clans, nurturing the ties that now protect them. Several commanders have taken local wives, and Hamaha, whose family is from Kidal, confirmed that Belmoktar is married to his niece.

Fowler described being driven for days by jihadists who knew Mali's featureless terrain by heart, navigating valleys of identical dunes with nothing more than the direction of the sun as their map. He saw them drive up to a thorn tree in the middle of nowhere to find barrels of diesel fuel. Elsewhere, he saw them dig a pit in the sand and bury a bag of boots, marking the spot on a GPS for future use.

In his four-month-long captivity, Fowler never saw his captors refill at a gas station, or shop in a market. Yet they never ran out of gas. And although their diet was meager, they never ran out of food, a testament to the extensive supply network which they set up and are now refining and expanding.

Among the many challenges an invading army will face is the inhospitable terrain, Fowler said, which is so hot that at times "it was difficult to draw breath." A cable published by WikiLeaks from the U.S. Embassy in Bamako described how even the Malian troops deployed in the north before the coup could only work from 4 a.m. to 10 a.m., and spent the sunlight hours in the shade of their vehicles.

Yet Fowler said he saw Al Qaeda fighters chant Quranic verses under the Sahara sun for hours, just one sign of their deep, ideological commitment.

"I have never seen a more focused group of young men," said Fowler, who now lives in Ottawa, Canada. "No one is sneaking off for R&R. They have left their wives and children behind. They believe they are on their way to paradise."