Pursued in one place in west Africa, extremists pop up somewhere nearby. The first article describes an improving picture in Mali; the second looks at Niger

WHEN French troops planted their tan boots in the sands of Mali earlier this year, they faced not one but three problems in the west African nation. With the help of arms looted from Libyan depots, an alliance of Tuareg separatists had taken control of the north of the country. They were joined by jihadists linked to al-Qaeda and bent on establishing a ferociously Islamist state. In the meantime, the Malian army had crumbled during an officers’ coup, leading to the disintegration of a political system that had been more or less democratic for the past two decades.

What a difference six months can make. Ignoring warnings of a quagmire, François Hollande, the French president, dispatched 4,000 soldiers to rescue the country. They quickly secured northern Mali and dealt with the most immediate problems, many familiar from France’s long stint as the colonial master.

Within days, the Tuareg, a nomadic people who had come to loathe their jihadist friends, signalled a desire for reconciliation with the rest of the country, if a measure of autonomy—a long-standing goal—could be agreed on. The French helped to smooth the way by keeping some Tuareg forces intact, even allowing them to hold on to bits of territory for a while, and then surrender to troops from Chad, who were supporting the French effort, along with other neighbours, rather than to their old Malian foes. In late June the Tuareg signed a peace deal. It was a very different war with the jihadists. France gave chase across open country, cornering them along the mountainous border with Algeria. The campaign persists amid setbacks. Some extremist leaders escaped, and a low-level insurgency is simmering. But many Islamist foot soldiers have been killed or driven away. As for politics in Bamako, Mali’s capital, fissures are beginning to heal. On June 26th Captain Amadou Sanogo, who led last year’s coup, apologised publicly for his actions. An interim president, Dioncounda Traore, is trying to close a rift in the armed forces between plotters and those who remained loyal to the elected if ineffectual former government. By common consent the priority now is an election to bestow legitimacy on a new government. Officials are frenetically preparing for a poll set for July 28th. Few are confident that Mali will be ready in time. Voter registration is in disarray. The distribution of biometric identity cards will take longer than expected. Besides, security in the north is still shaky. If the poll is plainly flawed, the next government might be hobbled by charges of illegitimacy. So some observers are calling for a short delay. Gilles Yabi of the International Crisis Group, a Brussels-based think-tank, told Voice of America radio station that the country certainly needs a presidential election. “But if they mess this up, if there is weak voter participation and if there is a part of the country, the south, that votes and a part, the north, that does not really vote, then that will not help Mali come out of this crisis and deal with its deeper issues of governance.”

The election’s success will depend in part on help from the UN. On July 1st it unveiled a 12,000-strong peacekeeping mission, its third largest in the world. Half the troops are west African and already in Mali as part of the French intervention force; they have “re-hatted” themselves in the UN’s new blue helmets. France will keep at least 3,000 troops in the country until the election and 1,000 thereafter, to hunt jihadists. The rest of the UN force, including 500 troops from China, will be in place by the end of the year.

Mali is assured of wide international support. Russia helped fly in French troops earlier this year. Rich countries have promised $4.2 billion in aid. The UN Security Council unanimously endorsed the Mali mission. (It also heard testimony that a UN communications system could not be brought to Mali’s hottest parts “because its sensitive components would melt.”)

The steamy Sahel

For over a year Mali has been the front line of a regional battle against Islamist extremism. As in Somalia, jihadists held large chunks of territory. The French intervention put the country back on course. But Islamist extremism is not defeated. If Mali gets a legitimate government, which is far from certain, the jihadists will simply move elsewhere in the Sahel, the southern Saharan fringe.

They have plenty of destinations to choose from. Northern Nigeria has its own Islamist rebellion. Arab and Persian clerics are sowing extremist seeds in coastal states such as Guinea and Senegal. Tracts of neighbouring Mauritania and Burkina Faso are lawless. Security along the Algerian border has been stepped up, yet passage to Niger remains wide open. Sudanese media, at the eastern end of the Sahel, reported earlier this year that Malian rebels had fled to the still dangerous Darfur region of western Sudan.

The extremists have the resources to feed and arm themselves and cover vast distances. Since 2004 they are said to have collected ransom payments from kidnapping to the tune of $60m. Many are also linked to trans-Saharan smuggling networks. It makes west African leaders nervous, even in Ghana, the region’s most successful state. With democratic politics and a strong economy, it has little reason to fear rebels. Yet its president, John Mahama, worries about the knock-on effect of Islamist militancy. “If we allow that foothold to consolidate, then it could affect the stability of our entire region,” he says. “We need to act collectively as a subregion and a continent and indeed globally to be able to ensure peace and stability.”

West African nations can do a lot, including better governance and public services, to inoculate their societies against extremism. But at least as important are joint efforts to monitor and protect territorial borders, which are among the world’s least defended; many run through sparsely populated areas. This has been a boon to roving extremists and their criminal allies. Financial aid for more border posts and investment in new surveillance technology could reinforce what are currently little more than lines in the sand.

Note: This story has been adjusted to credit a quote by Gilles Yabi to Voice of America radio.