TCHIBARAKATEN, Niger—In the deepest interior of the Sahara, almost three days drive from the nearest settlement, a vast tent city is rising at the nexus of global migration, jihadist terrorism and narcotics smuggling trails.

In the past two years, some 35,000 people have flocked to Tchibarakaten, a rocky desert outcrop perched in the lawless borderlands separating Niger from Algeria.

They have come from more than a dozen nations to mine the vast gold reserves under the sand.

Arriving in trucks escorted by the military, the miners have traveled from across West and Central Africa by donkey, motorcycle and even foot, transforming this barren landscape into a teeming conurbation. Stores sell everything from cookies and cans of tuna to metal detectors and dynamite. Restaurants, clinics and makeshift bars have sprouted alongside, all powered by batteries of buzzing generators.

Each day from dawn, miners bearing shoddy headlamps descend 400 feet below scorching sand to grind and hammer into rock. Before sunset, they tie weathered ropes around their waists, utter a short prayer and ascend the long climb to the surface. They ply their trade like prospectors from the great American gold rush, across a landscape reminiscent of Mad Max.

Tchibarakaten is the largest functioning artisanal gold mine prospect in Niger, a poverty stricken nation with the world’s highest birth rate that has become a key ally in the West’s war on terror and efforts to curb irregular migration.

Niger’s gold rush, which started in 2014, has come at a moment of swelling uncertainty. The 20 million population has been buffeted by aftershocks from civil wars in neighboring Mali and Libya, the Boko Haram insurgency in Nigeria and a recent spate of attacks by jihadist groups in its own territory. Other gold mines, including the sprawling Djado complex closer to the Libyan border, have been shuttered after violence erupted between armed groups vying for control.

Tchibarakaten – and the men who work here – are both shaping and being shaped by these trends.

Many, like Ibrahim and Abdoulaye, two young miners from Mali, have come to finance the next stage of their journey towards Europe.

“I hope I make enough to travel safely to France and find a good job,” said Ibrahim, clumps of yellow dust stuck to his eyelashes. “Each day is very difficult, but it’s better than home,” said Abdoulaye, emphasising his point with a cracked and calloused finger.  

Smuggler fees have surged in recent months after Niger’s government arrested hundreds as part of a deal with the European Union to halt the flow of people through the Sahara towards the Mediterranean. The crackdown has replaced the conventional routes through the smuggling hub of Agadez and Libya with new pathways through Algeria that run close to Tchibarakaten.

Analysts say the expansion of the mine is affecting the security dynamics across a region with few state structures that US and European policymakers see as a nascent hub for jihadist groups.

“Arms trafficking in the region has increased with the opening of the gold mines,” said Mathieu Pellerin, from the French Institute for International Relations. “The mines are also used by smugglers to move networks of migrants undetected.”

Tchibarakaten’s position as a way station on the resurgent smuggling routes along Algeria’s borders has escalated diplomatic tensions.

Algeria’s government in 2016 constructed a two-meter tall berm running hundreds of kilometers along the border to stop trucks smuggling migrants across the frontier. Since April last year, Algeria has rounded up more than 11,276 migrants and dropped them in the desert, 10 miles from the Nigerien border town of Assamaka, and told them to walk back, according to the International Organization for Migration, an EU agency. Untold numbers have died.  

“The issue with Algeria has become a big problem,” said Hassan Salissou, Niger’s General Director of Mines and Quarries. “Our biggest concern is to not exacerbate the issues of migration and the movement of weapons.”

For now, the wealth at the mine appears to be worth the diplomatic cost.

Every week, a convoy of 40-50 pickup trucks each packed with dozens of migrants, makes the arduous journey here. Escorted by the military, the caravan hurtles through the bandit-riddled desert where hijackings are frequent and breakdowns cost lives.

The estimated dozens of kilograms of gold mined here each week works its way through a transnational supply chain of sifters, traders and couriers, usually ending up in Dubai’s mammoth gold market. The wealth has created a new class of gold barons, some of whom are familiar names associated with smuggling and narcotics trafficking with close relationships to high-level government officials.

Tchibarakaten’s deposits were first discovered in 2014. A few gutsy prospectors followed a vein of quartz – a rock often found close to gold – that snaked west until they reached Tchibarakaten and found large deposits of the yellow metal.

“You really knew you were on an island,” said Issaka Ary a Nigerien who was one of the early prospectors and traveled here with his brother. There was no telephone network, no fuel, and water cost $140 for 200 liters. Miners were often alone and small issues could spiral into life-threatening ones.

But there was gold – and lots of it. “You couldn’t go one month without pulling up kilos of it,” Issaka said.

As word spread of the bounty beneath the sand, local businessmen and their backers in Niger’s government invested in generators, jackhammers, rock grinders and dynamite.

That plunged the shafts deeper, and formed mountains of excavated rock. Most mines now drop more than 350 feet. Workers are lowered by ropes looped and knotted into makeshift harnesses around their legs.

Now the Ary brothers have more than 200 employees, four generators the size of small family homes, countless water tanks and have even built a medical clinic with a pharmacy. Work has been streamlined and more satellite mines are being dug every day. But as some of the upfront costs have decreased, the competition and its tensions have increased in kind.

Many miners have bought weapons – easily available in a region awash with guns from Libya’s armories. Those without guns carry the 6-12 inch daggers used by the local Tuareg ethnic group.

The three policeman stationed at the mine are under no illusions about their clout on the ground. “We have a tent here, but we cannot control so many people,” said Mohammed Aghali, the local police chief with a resigned chuckle. In this dusty, male-dominated frontier town, guns and gold are the rule of law.

The mining is even more treacherous. Each week the camp’s clinic sees an average of five cases of severe head trauma from falling rocks and two patients who have fallen down mine shafts. Shattered legs and broken backs are often the result. One person dies a month. “It’s the new mines that are the riskiest,” says Abdouraman Mohammed, the head nurse at the clinic, “But everywhere is dangerous. We are always busy.”

Yet in a country where almost one in ten children die before the age of five and the World Bank estimates the average daily income is $2.71, many see the mine as a windfall.

Dynamiters are paid roughly $9.25 per explosion with most laying around 5 explosions per day. Crushing rock at another miner’s shaft could make $462 a month in a country where a university-educated teacher often earns $277.

The vast majority of profits stay in the hands of those who have bought parcels of the land.

But as smuggling prices rise and the local economy flounders, Tchibarakaten keeps growing.

“It’s a gold rush,” says Mr. Salissou, the mining director: “It’s just beginning.”

Published in The Wall Street Journal’s October 17th print edition and available online here.