MOPTI, Mali 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.

Get Breaking News Delivered to Your Inbox

"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.

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 620,000 square kilometers (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 7,000-kilometer (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 200 to 300 kilometers (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.