GAO, Mali (Reuters) - Fierce fighting between Islamist rebels and Malian and French forces raged for a second day in the northern Malian town of Gao on Sunday, residents said.

The rebels attacked the north's largest town just days after French President Francois Hollande said Mali's sovereignty had almost been restored. It was the third major offensive there by Islamists since the town was retaken by a French-led military operation in late January.

"This time there are a lot of them and they are very determined," said a military official in Gao, who asked not to be identified. "We are trying to surround them. A lot of them have been killed and others are heading back to their homes, to melt back into the population."

France has deployed some 4,000 troops to Mali, alongside a regional African force, in a nine-week operation that has driven Islamists into desert hideaways and mountains near the Algerian border.

Gao is a former stronghold of the MUJWA Islamist group which controlled the town for around 10 months, imposing a violent form of sharia, Islamic law.

A Reuters witness saw four Islamist fighters - two carrying Kalashnikov assault rifles, one a rocket-propelled grenade launcher and another wearing what appeared to be an explosive belt - running across a dusty street as fighting continued elsewhere in the town.

Intense shooting had been reported for around two hours on Saturday evening after a group of Islamists slipped past military checkpoints to enter the town. Calm returned during the night but the combat resumed early on Sunday morning, residents said.

(Reporting by Cheick Diouara in Gao, Adama Diarra and Tiemoko Diallo in Bamako; Writing by Daniel Flynn; Editing by Robin Pomeroy)