SURROUNDED by rice fields and fishing boats, the mud-built town of Diabaly sits in the agricultural heartland of Mali. It also sits athwart the road from the Mauritanian border to one of Mali’s few big bridges across the river Niger, and on a back route north to the historic city of Timbuktu, which makes it something of a strategic crossroads. On January 14th rebel fighters who have held the north of the country for more than nine months pushed south and took the town, screeching into the streets in dozens of pickup trucks mounted with heavy machineguns, killing Malian soldiers as they went.

The rebels’ move was apparently a response to the French ground and air intervention which began on January 11th, known as Operation Serval. Its ultimate objective is, in President François Hollande’s words, to “restore Mali’s territorial integrity”— meaning to oust the Islamist forces that combined with rebellious Tuaregs to conquer the country’s sparsely populated north last year.

France, the former colonial power, drafted last year’s UN Security Council resolution providing a mandate for a regional African force to rescue northern Mali. As worries grew a few months ago that that force might arrive too late, plans were hatched for France to act on its own.

But preparations were still at an early stage when, on January 8th, two columns of insurgents, each of about 150 vehicles and around 600 men, forced the issue by heading south. Within two days the eastern jaw of this pincer movement had captured the town of Konna from the ramshackle Malian army and was heading towards Mopti, the bustling river port that is Mali’s second city. The western jaw appeared to be making for Bamako, Mali’s capital, 600km (400 miles) farther south. The French decided that only prompt action would save it from the jihadists. The first French attacks made use of Mirage 2000 jets flying from Ndjamena in Chad and a small number of Gazelles—light utility helicopters—that had been discreetly pre-positioned at Ouagadougou, in neighbouring Burkina Faso, a few months earlier. That was enough to smash the column closing on Mopti, but the Gazelles lacked the range to hit the second column in the west. This was later struck by more modern Rafale jets that had been deployed to Ndjamena from France and armoured Tiger attack helicopters. Since then the French forces have rapidly built up, thanks to transport planes from Britain, Canada, Denmark and, belatedly, America. The use of other countries’ C-17 transport planes was crucial; the Tigers could not be moved in without them. As of January 23rd 2,300 French troops had been deployed. After a series of night-time air attacks and some scouting by special forces, on January 21st French and Malian forces in armoured vehicles retook Diabaly without a fight. The citizenry celebrated among the burned-out carcasses of the rebels’ cars, French flags fluttering gaily.

The short version of the long game

According to François Heisbourg, special adviser to the Paris-based Foundation for Strategic Research, the campaign is doing well in terms of its initial goals: securing the south of the country and breaking the jihadist offensive. The insurgents are well trained, quite well armed and know the terrain, but they do not appear to have sophisticated shoulder-launched missiles that would threaten the Rafales and Tigers. Early reports of rebels preparing to fight at close quarters in the towns and villages they have taken over have not so far been borne out. But Malian soldiers talk of the city of Sévaré, which is near Mopti and has an airfield, having been “infiltrated”.

Mr Heisbourg says that the aim now is to pile on the damage to retreating insurgents and rebel positions farther north before the rainy season comes in about a month’s time. Finding retreating rebels may be tricky. No one knows where the ones from Diabaly went: they could be hiding in the houses of sympathisers nearby, or in forests to the west, or in Mauritania, home to some of their leaders. “It’s very easy for them to come back,” said a scared farmer.

In the desert to the north, though, it is harder to hide. Jonathan Eyal of the Royal United Services Institute, a London think-tank, says that in the flat, featureless terrain French spy satellites can spot formations of as few as ten men on the move. American long-range surveillance drones are keeping an eye on things, too (and it would be a good hunting ground for their armed siblings). There have been bombing raids on two of the three big towns in the north, Gao and Kidal, and on a command base close to Timbuktu. As in Diabaly, the air strikes will be followed up by ground forces. France wants them led by the Malians, but they will rely on French muscle.

The hope is to kill as many as possible of the most fanatical jihadists, and to garrison the northern towns with soldiers from Mali and its neighbours, before the insurgents can regroup or bring in recruits. The French think the garrisons may also have to keep order as the towns’ inhabitants seek revenge against the Islamists who have made their lives a misery.

Having failed to organise a force before the fighting started, Mali’s 14 fellow members of the Economic Community of West African States (ECOWAS)—plus nearby Chad, whose army the French rate more highly than others in the region—have come aboard quickly. Some Togolese and Nigerian troops have already arrived in Bamako. The French say there are now 1,600 troops from other African countries in Mali and Niger; all told, African states have pledged over 5,000. Western countries, however, will have to help with finance, logistics and transport. French officials have urged donors to give generously at an African Union conference in Ethiopia on January 29th, which will be seeking €340m ($452m) to fund the forces.

A 500-strong military-training mission from the European Union is expected to arrive by mid-February, but there is as yet no offer of direct military help from either NATO or the EU, which has a “battlegroup”, a combined arms force of about 1,500 currently supplied by Poland, Germany and France, designed for just such a contingency. Help from America with aerial refuelling has been a problem. The French asked the Americans for three tankers to help their jets cover the distances involved, but they have not been provided; further irritation was caused when the Americans said France would have to pay for the services of a C-17. They have since relented and provided some for nothing.

As ever, getting in may prove easier than getting out. On January 13th Laurent Fabius, the French foreign minister, talked of the French presence being a matter of “weeks”. Now he concedes it will be more like months. Mr Hollande says their forces will be there “as long as necessary”. Mr Heisbourg notes that the French have been in Chad for 45 years—though to be fair they have hardly been in combat all that time (and the base has come in handy).

It should not be that bad. Mali’s government and army are unpopular. Devout Muslims in Diabaly were horrified last year when soldiers shot 16 preachers whose car failed to stop at a checkpoint. The Tuareg are unlikely to trust the army. But most Malians seem to back the armed action against the rebels in the north. And secular Tuareg forces have parted company with the Islamists and are ready to deal with the government.

This is a counter-insurgency that is eminently winnable, especially if it can keep the momentum. Early success can be built on. On January 22nd a column of dozens of French tanks and armoured vehicles was seen heading north to Diabaly—and, presumably, beyond.