French President Francois Hollande has said his government will help rebuild Mali, three weeks after launching an offensive against Islamist rebels who had seized the north of the country.
Speaking in the capital, Bamako, he pledged more French aid to its former colony and vowed to restore cultural sites damaged by the rebels.
Mr Hollande said France would help Mali re-establish control in the north.
"Terrorist groups have been weakened, but not disappeared," he said.
French troops would stay in Mali "as long as necessary", he added, reiterating that France would hand over to African troops "once the sovereignty of Mali is restored".
Mr Hollande was speaking alongside Mali's interim leader, Dioncounda Traore, who thanked France for freeing the north to from "barbarity and obscurantism".
'Vive la France'
The French president also promised to help restore cultural artefacts damaged by the rebels - who set fire to about 2,000 priceless manuscripts in Timbuktu, a Unesco World Heritage site.
"We cannot tolerate what happened in Timbuktu," he said.
Earlier on Saturday Mr Hollande travelled to the northern city, which was recaptured by French and Malian troops six days ago.
Thousands of residents welcomed him with chants of "Vive la France".
Many women wore vibrantly coloured clothes and jewellery, which correspondents say they could not do during the past year of Islamist rule.
"The women of Timbuktu will thank Francois Hollande forever," 53-year-old Fanta Diarra Toure, one of thousands of people who gathered in the city's main square, told the AFP news agency.
The French president's visit comes as armoured columns of French and Malian troops continued their advance in northern Mali.
They are attempting to secure the north-eastern city of Kidal, the militants' last stronghold, having captured the airport on Wednesday.
In Bamako, Mr Hollande also said "terrorists" must be punished, but added: "You must do it while respecting human rights."
There have been allegations of human rights violations committed by the Malian army, including summary executions and disappearances.
There had also been reports of incidents of mob lynching and looting of properties belonging to Arab and Tuareg communities, which had been accused of supporting armed Islamist groups, the UN says.
A total of 3,500 French troops are currently in Mali.
Nearly 2,000 army personnel from Chad and Niger are already helping consolidate the recent gains. A further 6,000 troops will be deployed as part of the UN-backed African-led International Support Mission to Mali (Afisma).
The BBC's Andrew Harding in Timbuktu says this was a big moment for President Hollande, but there is a danger that this is as good as it may get for him.
Now, things get more complicated, our correspondent adds, and if the French get their exit strategy wrong and move too quickly, Mali could easily be plunged back into chaos.