(CNN) -- French President Francois Hollande visited the Malian town of Timbuktu on Saturday, a jubilant trip days after his nation's forces freed the fabled city from the iron grip of Islamist militants.

France launched the offensive against militants in its former colony three weeks ago. The ground and air campaign has sent Islamist fighters who had seized the northern region fleeing into the vast deserts.

"We are serving a cause defined within the United Nations' framework ... to bring the entire Malian territory under the legitimate authority of the Malian president and then the leaders who will be elected by the Malians," Hollande said in Timbuktu.

French troops, he said, are not in Mali to venture into politics.

Broken limbs, torn lives in northern Mali

"I have enough to do with French politics," he said. "So we are at the service of a mission which was defined from the call of the Malian president and within the framework of the Security Council resolutions."

Hollande landed in Sevare accompanied by his defense and foreign ministers, CNN affiliate BFMTV reported.

From there, he joined Malian interim President Dioncounda Traore for the Timbuktu visit. French-led forces liberated the historical city this week after Islamist militants took control of it last year.

In Timbuktu, residents bestowed him with a camel while others danced.

What's behind instability in Mali?

The trip comes as troops from both nations make major gains in the battle against militants.

French-led troops now control Timbuktu and Gao cities, along with a swath in between that was an Islamist stronghold for almost a year, the French Defense Ministry said.

France sent troops at Mali's request after radical Islamists seized the strategic town of Konna on January 10. The town is now back under Malian control.

Islamic extremists carved out a large portion of the north last year, taking advantage of a chaotic situation after a military coup.

They banned music, smoking, drinking and watching sports on television, and destroyed historic tombs and shrines in the region. World leaders feared that the al Qaeda-linked militants would turn the area into a terrorist haven.

Opinion: Why Hollande must show clearer leadership

But with the offensive sending the fighters scattering, residents are once again roaming the streets without fear.

France has 2,150 soldiers in Mali and 1,000 more troops supporting the operation from elsewhere.

Hollande's visit comes a day after a rights group accused Malian troops of extrajudicial killings and abuses during the offensive.

"Malian government forces summarily executed at least 13 suspected Islamist supporters and forcibly disappeared five others from the Garrison town of Sevare and Konna" in January, Human Rights Watch said.

The United Nations also warned that the Tuareg and Arab civilians in Timbuktu, Kidal and Gao regions are at risk of reprisal attacks.

Malian and French military officials have repeatedly called for respect of international law and human rights.

Six reasons events in Mali matter