France's armed forces chief says jihadist forces in Mali are on the back foot but the fight to restore peace in the poor Sahel country will be long.
Speaking to AFP and French radio station RFI, General Francois Lecointre said recent attacks by jihadists in Mali should be seen as the sign of a beleaguered enemy.
"The reason why the enemy has reacted so brutally is precisely because we went after him in his last holdouts," he said last week while visiting troops from France's Operation Barkhane in Mali.
"Another probable reason is that it has to restore a certain reputation with the public" for its ability to mount attacks, he argued.
Since the start of the month, 26 Malian troops have been killed in jihadist attacks in central Mali, sparking angry protests by their relatives.
"These highly symbolic attacks, which come on the heels of very powerful blows by Barkhane and its allies, are the reaction of someone who feels cornered," Mr Lecointre said.
"For me, it's a positive sign."
But the enemy had not yet been defeated, he said.
"Obviously.. these groups are trying to get themselves back together and forge alliances because they have been weakened."
France sent troops into Mali in 2013 to help drive back Islamist insurgents who took control of the north of the country.
And Operation Barkhane, which has 4,500 troops, remains in place, with 2,700 soldiers in Mali to support poorly-equipped local military forces.
But the deployment comes at a hefty cost and has been subjected to political scrutiny.
General Lecointre, 57, said Mali faced a long-term battle for stability.
"I am cautious," he said.
"It will be a long battle to change mindsets, to ensure the public believes in its State, in a Mali whose competence extends across the whole of the country.
"This is not the kind of work that can be done at the flick of a switch -- it has to bring together the military effect and real work in communication and development."
On Saturday, 130 Fulani villagers in central Mali were killed by an ethnic militia, a massacre that prompted the government to sack senior military officers and break up the militia.
Mr Lecointre also admitted that early expectations for a French-backed five-nation anti-terror force in the Sahel had been premature.
Conceived in 2015, the G5 Sahel aims to pool the military strengths of Burkina Faso, Chad, Mali, Mauritania and Niger.
The French-backed force carried out its first operation 18 months ago but faces major obstacles in terms of training, equipment and funding. It has still only mustered 4,000 out of a proposed 5,000-man complement.
"I think we were too impatient," General Lecointre said.
"We probably pushed for this joint force to make a symbolic commitment to carry out operations when it was not completely ready," he acknowledged
There were political gains from the launch, which saw the G5 Sahel gaining a measure of international support, he said.
"However, it is always difficult to build an army, an operational force," he said. "It's politically complicated."
But the force is now operating within an established legal framework, he said.
"And now the forces made available for the G5 Sahel have to reach capacity, while understanding they are subject to their national armies which are heavily engaged in their respective territories."
General Lecointre said the rising number of jihadist attacks in Burkina Faso was "a source of concern".
"It indicates a spread of the jihadist movement to the south," he said.
France was stepping up its cooperation with Burkina Faso and was looking at ways of helping it combat jihadist encroachment in frontier zones, he said.