French and Malian soldiers examine maps of the area in the town of Niono, near the frontline, on Saturday, Jan. 19, 2013. Niono serves as the staging ground for combat operations in the nearby town of Diabaly where French and Malian forces battle Islamist rebels. (Pete Muller/For The Washington Post)

By Saturday morning, the Islamist fighters had departed Diabaly in their pickup trucks topped with machine guns. But hours later, neither the French nor the Malian forces had entered the town. A Malian military contingent drove to the edge of Diabaly but turned back. There were still too many questions, too many risks.

“Today, the Islamists are not visible in Diabaly, but where are they?” asked Seydou Traore, an official in the frontline town of Niono, 43 miles south of Diabaly. “Did they cross the border in Mauritania? Or did they move inside Mali?”

“Nobody knows when, how or if they will come back,” he added.

The war in this West African country is transforming into a cat-and-mouse insurgency, much like the asymmetric conflicts in Afghanistan or Yemen. The militants seize towns but then vanish after airstrikes bomb their positions, only to regroup and emerge elsewhere. And with their ability to meld into the local population, they can orchestrate ambushes or gather intelligence to use against their foes.

What unfolded in Diabaly last week highlights the challenges France and its allies face as they seek to oust the militants who seized a vast arc of territory in northern Mali last year. Witnesses and military officials say the militants were seen pulling out of the town, but suspicions lingered that they had left behind spies or assassins within the population — or perhaps mines or other traps.

“It’s not possible to say if they have left Diabaly 100 percent,” said Lt. Col. Seydou Sogoba, a Malian military commander. “It’s hard to tell who’s an Islamist. They don’t have ‘Islamist’ written on their faces.”

Taking advantage of a military coup that destabilized the government, a mix of secular Tuareg separatists and radical Islamists overran a Texas-sized swath of territory in March. They were fueled partly by weapons from the arsenals of the former Libyan leader Moammar Gaddafi. The Islamists then pushed out the separatists and installed a harsh brand of Islamic law. Today, three militant Islamist groups control the north.

Following an advance by the militants southward, France launched a surprise military assault on Jan. 11, pummeling the Islamist positions with airstrikes. Yet the militants still swept last Monday into Diabaly, about 250 miles from the capital, Bamako.

Malian army units and French special-forces soldiers clashed with the militants, said Sogoba, who was in Diabaly at the time. But after the attackers began to fire from houses, he said, the soldiers pulled back to Niono in order to avoid civilian casualties.

While Malian and French military officials said that their forces engaged in ground combat in and around Diabaly, military officials in Niono said that aside from the clashes on Monday, no other fighting occurred. Instead, French warplanes repeatedly struck at the militants’ positions, said Sogoba and Traore.

About 4 p.m. Saturday, a column of French armored personnel carriers rolled into Niono, part of the force of 2,000 French troops operating in Mali. Some residents waved French flags; others clapped and cheered. A few men yelled: “Long live the French army.”

There was no visible affection for the militants.

“They are not Islamists. They are not Malians,” said Abdulwahab Kouyate, who was dressed in traditional Malian garb that had been stitched in the colors of the French flag. “They are just terrorists.”

The head of the French military contingent said his forces had some ideas as to the whereabouts of the extremists. But when asked if it was possible that they could return to Diabaly, he replied: “Yes, of course. This is one of the possibilities,” said Lt. Col. Frederick, who did not give his full name.

Oumar Diakite, the mayor of Diabaly, returned on Saturday to his home. The militants, he said in a telephone interview, had destroyed the walls of some houses, and had vandalized stores. They left behind loads of ammunition, as well as the charred remains of vehicles destroyed by the airstrikes. They had carried the bodies of their comrades with them, except for one who was found in a bush.

But even though the militants had left, fear prevailed.

“Some people are coming back, but others are still leaving the town,” Diakite said. “The army is not here. They came and left.”

Some residents expressed concern over where the Islamists would turn up next. Rumors floated everywhere.

“Last night, we heard they were somewhere between Nara and Banamba,” said Kouyate, referring to two towns less than three hours away by car.

A visit on Friday to Banamba, 90 miles from the capital, revealed the sense of apprehension that has gripped many Malians. Local officials said that a man was arrested last week after residents grew suspicious, though they had scant evidence. The mancarried a Koran and spoke some Arabic, but not Bambara, the language spoken by southerners, said Soumana Kantako, a deputy mayor.

With the rebel fighters on the run from some places, residents expressed apprehension they would enter others.

“The ones who escape from Diabaly could come here,” said Fana Sow, 30, a trader. “I am afraid of this.”