SÉVARÉ, Mali — Residents of northern Mali’s largest city poured out of their homes to celebrate the expulsion of Islamist fighters who had held their town for months, playing the music that had been forbidden under the militants’ harsh interpretation of Islamic rule and dancing in the streets.

“Everyone is in the streets,” a Gao resident, Ibrahim Touré, said in a telephone interview. “It is like a party. There is music. There are drums. It’s freedom.”

Their celebrations came as international forces trying to recapture northern Mali, which has been seized by a mosaic of heavily armed Islamist groups, deployed into Gao, one of the principal militant strongholds, French officials said Sunday. Malian forces backed by French troops also advanced toward another crucial northern town: the ancient city of Timbuktu.

Prime Minister Jean-Marc Ayrault of France said French troops were “around Gao and soon near Timbuktu,” farther west. Timbuktu has been under the control of rebels and Islamist fighters for 10 months, although there are reports that many of the Islamists have moved farther into the vast desert to escape the advancing forces.