President Emmanuel Macron has announced he will be pulling French forces out of the West African nation of Mali, where they have been fighting Islamist militants since 2013.

There are 5,000 French troops in Mali and surrounding countries, fighting groups such as al-Qaeda and Islamic State.

But over the past eight years, the French presence has become increasingly unpopular with Mali's government and its public.

What is the terrorist threat in Mali and the Sahel region?
Both the Islamic State group and al-Qaeda have decided to focus on the Sahel region of Africa, after suffering setbacks in the Middle East.

The Sahel is a strip of semi-arid land beneath the Sahara Desert that stretches across the continent from east to west. It includes parts of Chad, Niger, Mali, Burkina Faso and Mauritania.

Map of the Sahel region in North Africa with an indication of which Jihadist groups operate in each country
Image caption,
IS and al-Qaeda's JNIM are both active in the Sahel region where they compete for power
Islamic State in the Greater Sahara (ISGS) and al-Qaeda's affiliate, called Jamaat Nusrat al-Islam wal-Muslimin (JNIM), have carried out terror attacks in the region which have killed several thousand people, displaced tens of thousands of others and caused thousands of schools to close.

There are two other jihadist groups active in the Sahel: Ansaroul Islam and Boko Haram.

In April 2022, jihadists attacked three military bases in central Mali and one in Burkina Faso, killing six soldiers,

Why did France become involved?
In 2013, France sent 5,000 troops to Mali at the government's behest as it was facing an armed rebellion.

After the ousting and killing of Libya's leader Muammar Gaddafi, Tuareg mercenaries who had been fighting for him returned home to Mali determined to fight for the independence of the north of the country.

With Gaddafi's weapons, they formed an alliance with al-Qaeda-linked Islamists who were to become the stronger partners. Together they took control of the north and threatened to seize control of the whole country.

Mali was a French colony until 1960. France's government said it wanted to protect the Malian population and the 6,000 French citizens living there.

Soldiers of France's Barkhane mission patrol in I-n-Tillit in 2017 in Mali
IMAGE SOURCE,GETTY IMAGES
Image caption,
French troops have been part of Operation Barkhane against militants in the Sahel
Of those troops 2,400 have been located in northern Mali, while the rest have been using drones and helicopters to hunt down jihadist cells that operate across Mali, Chad, Niger, Burkina Faso and Mauritania.

There are also 14,000 UN peacekeeping troops who operate alongside local military forces, patrolling across the deserts of the Sahel.

Why did the French presence become unpopular?
The French forces were warmly welcomed when they first arrived in Mali nine years ago, but relations have since soured.

The number of terror attacks in the country has steadily increased, and so has the number of Malians joining insurgent groups. In the past nine years, the Islamist militant threat has also spread to other countries such as Burkina Faso and Niger, with insurgents raiding in the region from their bases in the Sahara.

Many local people feel that France, as an advanced military power, should have been able to solve the terror problem and that it should get out of the way if it cannot do so. Some have called the presence of troops from the former colonial power an "occupation".

Since 55 French troops have been killed in the Sahel, it is not popular in France, either.

Malians stage a protest against France at the Independence Square in Bamako
IMAGE SOURCE,GETTY IMAGES
Image caption,
There have been regular protests In Mali against the French military
There have also been arguments between the French government and Mali's military junta, which seized power in a coup in August 2020 - the second time a civilian government has been overthrown in eight years.

The junta reneged on an agreement to hold democratic elections this February and says it will hold on to power until 2025. When France's ambassador objected, he was expelled.

President Macron said: "We cannot remain militarily engaged alongside de facto authorities whose strategy and hidden aims we do not share."

In April 2022, Mali's rulers announced they would hold elections two years later, in 2024.

France has refused to negotiate a peace deal with Islamist groups, which is a policy favoured by many Malians.

France was also angered by the decision of the Mali junta to invite mercenaries from the Russian company Wagner to help in the fight against the jihadist groups.

France's Armed Forces Minister Florence Parly said that "we will not be able to cohabit with mercenaries".

What happens now?
The French troops involved in Operation Barkhane will be withdrawn over the next four to six months.

France will deploy troops in other countries in the Sahel, alongside the troops of other European nations serving with the Takuba Task Force. Countries involved in that say they will be setting out plans for how they will operate in the region in the future.

The governments of neighbouring countries are worried that France's withdrawal from Mali could further destabilise the region. Ivory Coast President Alassane Ouattara warned it would create a political vacuum.

"We will be obliged to increase our defence forces and increase the protection of our borders," he said.

Ghana's President Nana Akufo-Addo urged the UN to keep its peacekeeping force in Mali despite the French departure.

The arrival of the Wagner Group mercenaries has been welcomed by some Malians, who see it as politically neutral. However, many Western countries are suspicious of it and have accused the Russian government of helping it win its contract in Mali.

In April 2022, the French military accused Russian mercenaries of burying bodies outside a military base and blaming French troops for the killings.

France says it is part of efforts to discredit its departing force. Russia has not commented on the allegations.

Wagner has been operating in several other African countries, including Mozambique, Sudan and the Central African Republic. It has also been linked to war crimes in Libya's civil war.