A statement signed by France and its African and European allies said that "multiple obstructions" by the ruling junta meant that the conditions were no longer in place to operate in Mali.
France and its European partners involved in the fight against militants in Mali have decided to start the coordinated withdrawal of their military resources in the country.
They agreed to set out plans on how to remain in the region, notably Niger and Gulf of Guinea countries by June 2022, a joint statement said on Thursday.
The joint statement was issued by countries operating with France's Barkhane counter-terrorism force and the Takuba mission, which includes some 14 European nations.
French President Emmanuel Macron said the attitudes of Mali's ruling junta had forced France to pull out and denied that its almost decade-long deployment had ended in failure.
"We cannot remain militarily engaged alongside de-facto authorities whose strategy and hidden aims we do not share," Macron told reporters on Thursday, adding he "completely" rejected the idea that France had failed in its former colony.
Even after the pull-out from Mali, however, the allies vowed to remain engaged in fighting terror in other countries including Niger.
"They agreed nonetheless to continue their joint action against terrorism in the Sahel region, including in Niger and in the Gulf of Guinea," the statement said.
There are a total of 25,000 foreign troops currently deployed in the Sahel region, including around 4,300 French soldiers.
'The pullout will impact peacekeepers'
France's withdrawal from Mali is "bound to impact" the UN's peacekeeping mission in the troubled Sahel state, the United Nations said on Thursday.
Olivier Salgado, the spokesman for the MINUSMA peacekeeping mission in Mali, said that the UN was studying the impact of the pullout and would "take the necessary steps to adapt."
It currently has about 12,000 troops in the country, according to its website.
The Mali deployment has been fraught with problems for France. Of the 53 soldiers killed serving in its Barkhane mission in West Africa, 48 of them died in Mali.
France initially deployed troops against militants in Mali in 2013 but the militancy was never fully quelled, and now new fears have emerged of a militant push to the Gulf of Guinea.
Relations between Paris and Bamako have deteriorated since the military junta went back on an agreement to organise elections in February and proposed holding power until 2025. It has also deployed Russian private military contractors, which some European countries have said is incompatible with their mission.
READ MORE: French soldier killed in Mali mortar attack