France officially began pulling out its troops from Mali Thursday, ending the nation's nine-year anti-terrorism campaign in the region. The country's decision to withdraw even as the unstable region is still plagued by terrorist threats has undermined its once-dominant standing with most of its former colonies.

French officials said the nation's three main military bases in Mali would be shut down over the next four to six months. France initially began to send troops to Mali in 2013 as part of its campaign against Islamist extremists that have been wreaking havoc in the region, including in countries such as Niger and Burkina Faso.

As France's military involvement in the region has grown increasingly controversial, jihadist groups have ramped up their activities across Mali and neighboring countries. In recent years, Mali's authorities have turned to Russia for assistance.

The French withdrawal will undoubtedly have geopolitical implications, and it will be a humiliating exit for the country from the region of the world where its influence had long been unchallenged. Its influence in West Africa has been rapidly eroding in the face of newcomers such as China, Turkey, Germany, and Russia.

With French presidential elections less than two months away, the French government had intended to avoid any similarities to last year's messy withdrawal of American forces from Afghanistan. After meeting with African leaders the night before, France was cautious about making the announcement and depicting the event as a coordinated departure of France and its partners in the region.

President Emmanuel Macron expressed his disappointment with Mali's leaders, who came to power following two coups in the previous 20 months, and said the breakdown in ties had forced France and its partners to reassess their strategy and restructure their forces. Macron said the nation could no longer remain militarily engaged in a country where the government's objectives are not in line with France's goals.

In Mali and in some African countries, France's withdrawal has been seen as a humiliating defeat. Political analysts said that even if France is saying that it is voluntarily leaving, most people in the region see the withdrawal as France being kicked out.

Ibrahim Yahaya Ibrahim, a Sahel analyst for the International Crisis Group, said France's retreat would also be seen as a major victory by Jihadist groups in the region. The same groups have, for years, been calling on the withdrawal of foreign forces so they can be left to implement their own strict interpretation of Shariah law.