BAMAKO, Mali — As French and Malian troops routed Islamist militants from the northern Malian towns of Gao and Timbuktu, residents’ relief and elation appeared to give way on Tuesday to some measure of reprisal and frustration.

In Gao, groups of residents were reported hunting down suspected fighters who had not fled ahead of the French-Malian military forces who took control of the town over the weekend. Other residents expressed concern that Gao remained unsafe and was acutely short of food and fuel after a prolonged isolation.

“The city is free, but I think the areas close by are still dangerous,” said Mahamane Touré, a Gao resident reached by telephone from Bamako, the capital. “These guys are out there.”

Mr. Touré, who spent the evening watching soccer on television and listening to music with friends, said that although everyone was enjoying the new freedoms, the legacy of Islamist occupation was evident in the hardship of everyday life.