SAHARA DESERT, Niger — A group of light armored vehicles skated over the moonscape of the Sahara, part of one of the largest detachments the French military has deployed here since colonial times. Its mission is growing ever more urgent: to cut smuggling routes used by jihadists who have turned this inhospitable terrain into a sprawling security challenge for African and international forces alike.
Many of the extremist groups are affiliates of Al Qaeda, which has had roots in North Africa since the 1990s. With the recent introduction of Islamic State franchises, the jihadist push has been marked by increasing, sometimes heated, competition.
But, analysts and military officials say, there is also deepening collaboration among groups using modern communications and a sophisticated system of roving trainers to share military tactics, media strategies and ways of transferring money.
Their threat has grown as Libya — with its ungoverned spaces, oil, ports, and proximity to Europe and the Middle East — becomes a budding hub of operations for both Al Qaeda and the Islamic State to reach deeper into Africa.
And as Africa’s jihadists come under the wing of distant and more powerful patrons, officials fear that they are extending their reach and stitching together their ambitions, turning once-local actors into pan-national threats.
The Nov. 20 assault on the Radisson Blu hotel, which killed at least 19 people in Bamako, Mali’s capital, was just one of the more spectacular recent examples of the ability of these groups to sow deadly mayhem. Across the region, hundreds of people have been killed in terrorist attacks in the past year.
Gen. David M. Rodriguez, who heads the United States Africa Command, warned in a congressional statement in March of an “increasingly cohesive network of Al Qaeda affiliates and adherents” that “continues to exploit Africa’s undergoverned regions and porous borders to train and conduct attacks.”
“Terrorists with allegiances to multiple groups are expanding their collaboration in recruitment, financing, training and operations, both within Africa and transregionally,” General Rodriguez warned months before the Mali attack.
The transfer of expertise can be witnessed in the spread of suicide bombings in Libya, Tunisia and Chad and in the growing use of improvised explosive devices in Mali, analysts and officials pointed out.
Such exchanges have been enhanced as groups shift shape, sometimes merge, and come under the wing of more powerful and distant patrons.
In one instance, two of the longest-standing North African groups, Al Qaeda in the Islamic Maghreb and Al Mourabitoun, after a long publicized split, announced that they had reunited and that the Bamako hotel attack was their first joint venture.
The leaders of the two groups — Abdelmalek Droukdel and Mokhtar Belmokhtar, both Algerians — have loyalties that reach far beyond Africa, however.
As does Seifallah Ben Hassine, leader of Ansar al-Shariah in Tunisia, the organization believed to be behind three deadly attacks in Tunisia last year, including a massacre of 38 people at a beach resort in June and an attack on the Bardo Museum in Tunis in March that left 22 dead.
All three men are veterans of fighting in Afghanistan in the 1980s, swore allegiance to Osama bin Laden and now profess loyalty to Al Qaeda’s current leader, Ayman al-Zawahri, based in Pakistan.
Mr. Droukdel, routed by French forces in Mali in 2013, is reportedly holed up in the mountains in southern Algeria. Mr. Belmokhtar and Mr. Ben Hassine have made rear bases in Libya, where they have been targeted by American airstrikes.
Today, despite French and American efforts to disrupt their networks, they still stretch across the continent.
To keep the pressure on the jihadists and help resist the threat, France has installed 3,500 troops across 10 bases and outposts in five vulnerable countries — Mauritania, Mali, Niger, Burkina Faso and Chad. The recent French patrol, tiny dots in the Sahara’s expanse of dunes and blackened rock, included 30-ton supply trucks carrying food and fuel, armored vehicles mounted with 80-millimeter cannons and a medical truck.
Similarly, American Special Operations Forces are working in Niger, and last year President Obama ordered 300 United States troops to Cameroon to help defend against the Nigerian Islamist movement Boko Haram, which has spread across borders.
French troops have led repeated operations to break communication and supply lines from Libya that have fortified such groups. The November operation was part of coordinated maneuvers in eastern Mali and northern Niger to try to disrupt jihadist links between the two nations.
The smuggling route patrolled by the French is one of the main arteries for jihadists, arms and drugs. French troops call it the “autoroute” to southern Libya, which they describe as a “big supermarket” for weapons.
The route crosses one of the most remote places on earth. Devoid of human habitation or water for hundreds of miles, it is a treacherous terrain of unbearable heat in the summer and nearly impossible navigation. Yet small convoys of smugglers attempt the crossing several times a week.
For the French, it is like looking for a tiny craft in an ocean, said Lt. Col. Étienne du Peyroux, the commanding officer leading the Niger operation.
“It is like a naval battle,” he said, sketching out the hunt on maps on the hood of his desert jeep. “The zone of operations is 40,000 square kilometers, an area the size of Holland, for 300 men.”
“We try to find them, to block, to constrain, to work out how they will be channeled by a particular piece of terrain,” he said.
The French rarely catch anyone — the last capture was of a drug haul in June. But, they say, their operations are at least disrupting the jihadists’ movements, evidenced by a drop in traffic and tracks in the sand showing smugglers’ vehicles having turned back.
“We want them to abandon the fight, until they cannot do it anymore or until the effort is too great,” the colonel said.
That, however, seems unlikely. “Weak government and chaos are always conducive to terrorism,” said Hans-Jakob Schindler, coordinator of a United Nations Security Council committee that monitors the Qaeda sanctions list. “These groups do take advantage of that.”
The development of jihadist training camps in Libya over the past four years represents a regional and international threat, with particular significance for Africa, he warned in a recent report.
Especially worrying, he said, is “the growing numbers of foreign terrorist fighters and the presence of a globalized group of terrorists from different Al Qaeda backgrounds.”
North Africa and the Sahel, a vast area the breadth of the United States — with its difficult geography, impoverished populations and weak states — is acutely vulnerable, military and civilian analysts said.
Poverty, corruption, poor government and unfair elections are all making populations susceptible to Islamist propaganda, said Adam Thiam, a columnist for the Malian daily newspaper Le Républicain.
“Elections are corrupt; services are corrupt,” he said, and young people have lost confidence in government, “so they will go and listen to the religious leaders rather than the political leaders.”
Others blame foreign interventions in Libya and Mali, and repressive counterrevolutions like Egypt’s, for fueling support for the jihadists.
Certainly, despite the interventions and improved security efforts, new groups and recruits continue to appear. Al Qaeda in the Islamic Maghreb and its affiliates remain active in Mali, and they have sponsored a new group, the Massina Liberation Front, which has emerged in the past few months.
“They do not need much; they just need to be determined,” said Col. Louis Pena, a commander of French troops in N’Djamena, Chad.
The deepening reach of Al Qaeda and the arrival of the Islamic State are raising fresh alarm.
While the two groups are rivals, that competition can pose a significant challenge from a broader security standpoint — as extremists seek to prove their potency and relevance, inspire and attract recruits, and play on a bigger stage.
The effect can be witnessed prominently in Boko Haram’s six-year insurgency in Nigeria, which has killed 17,000 people and displaced more than a million.
Boko Haram has been around for two decades. But money and training from Al Qaeda in the Islamic Maghreb gave its leader, Abubakar Shekau, a substantial boost when he assumed control in 2010.
Last year, Boko Haram switched allegiance to the Islamic State, which claimed that its West Africa division had killed more than 1,000 people since November, according to the Site Intelligence Group, which monitors jihadist websites.
Despite setbacks in Nigeria, Boko Haram has become a regional scourge by exploiting contacts in the wider jihadist network, and it has now spilled into Chad, Cameroon and Niger.
At Madama, an oasis about 50 miles south of Libya, a mud-brick fort built by the French in 1931 guards Niger’s northern desert approaches.
In the past two years, the French have built a sprawling base dwarfing the old fort still manned by Nigerien troops, and posted 300 French troops to create a buffer against jihadist advances from Libya.
Nigerien soldiers accompany the French on their missions, hurtling in battered pickups across the desert terrain, much like their jihadist opponents do. Many of the local soldiers have been through six-month training programs run by American forces. Farther east, Chadian troops guard their part of the border.
In this lonely spot, French soldiers watch from their guard post out across the empty sand toward Libya. French commanders agree that the root of the problem is there, and that until it is addressed the entire region is threatened.
“They are still fragile countries,” Colonel Pena said. “They are countries that need stability to grow and develop. That is the real danger.”
Correction: January 2, 2016
Because of an editing error, an earlier version of this article misstated the nationality of the troops manning a mud-brick fort in the Sahara and those accompanying French soldiers on their missions in the desert. They are from Niger, or Nigerien, not Nigerian.
By CARLOTTA GALL