PARIS (AP) — It was a picture postcard meant to portray unity in the vast and fragile lands that once were French colonies: President Emmanuel Macron standing with the leaders of five West African countries where France has spearheaded a counter-terrorism war since 2013.

"We are all convinced that victory is possible,” Macron said at the summit in Mauritania.

That was less than two months ago. Today, one of the five leaders has fallen. Ibrahim Boubacar Keita, the president of Mali — the country at the center of the battle against Islamist extremists — was ousted last week in a coup d’etat. But an unflinching Macron is pressing on, refusing to withdraw France’s 5,100 troops from West Africa, even though extremist attacks have multiplied and victory looks like a mirage in the crescent-shaped sand dunes for which France’s Operation Barkhane is named.

“Operation Barkhane ... continues,” French Defense Minister Florence Parly tweeted last week, after the bloodless coup in Mali by a clutch of military officers who detained Keita and his prime minister. France’s swift response showed its determination to maintain a military presence in West Africa remains intact despite pockets of anti-French sentiment and questions about whether this could become France’s endless war.

As coup leaders promise a transitional government of uncertain length, there is nothing sure about the allies or enemies of tomorrow in a region where ethnic loyalties count and Islamist extremists have spread across porous borders. Keita himself once warned Macron that extremist groups in West Africa are “an enemy with a thousand faces.”

The captive Malian ex-president formally resigned and the military junta that took over has stressed its wish for French and U.N. forces there to continue their job.

But with the removal of Keita, past guest at France’s Elysee Palace, the only constant is Macron’s doggedness.

Macron made Mali his first foreign visit — a week after his election in 2017 — putting at the top of his agenda the anti-terrorism fight in a region where France holds enormous sway.

Beyond security, “the French want, I think, to stay influential in their former colonies and have this leadership in this sort of global division of labor" by major powers, said Yvan Guichaoua, a Sahel expert at the University of Kent’s Brussels School of International Studies. “It’s a way to perpetuate the narrative of French grandeur among French public opinion ... We’re still a big power.”

But, he cautioned, “The longer you stay, the greater the chance that you become part of the problem.”

France has long had an outsized role in the five nations embroiled in the counter-terrorism effort in the Sahel region, its African backyard until decolonization in the 1960s. Mali, Niger, Burkina Faso, Chad and Mauritania remain tied by numerous accords to France, which maintains military bases and pumps in aid. France has 600 million euros ($708 million) in aid projects underway in Mali alone, according to the French Development Agency official in charge of Mali, Nicolas Mora.

A succession of French presidents has worked to shed the nation’s image as West Africa's gendarme, and Macron and his ministers take pains to underscore that Paris’ largest overseas military operation is wanted by the African countries and approved by the U.N. The French goal is to stabilize Mali and then allow troops of the region to take over.

France first intervened in northern Mali in Jan. 2013 to push back al Qaida-linked extremists who controlled swaths of the north and imposed their harsh interpretation of Islamic law. It was hailed as a liberation force as soldiers freed Timbuktu and other towns. But as years passed, killings mounted, al-Qaida replaced lost leaders and an Islamic State offshoot arose. Violence spread to neighboring Niger and Burkina Faso.

Today, some see the French as occupiers with a hidden imperialist agenda.

Anti-French protests erupted last fall, a message that so worried Macron he called a summit in January with the leaders of the G5 nations, demanding they clarify their commitment to the French intervention.

“France isn’t there with neocolonial, imperialist aims or with economic goals,” Macron said ahead of the summit. “We’re there for the collective security of the region, and ours.”

But France’s presence has become increasingly unpopular in Mali as the violence that has undermined security in the West African nation since 2013 has not abated. Thousands in Mali have protested against France’s presence, often referring to their presence there as an “occupation.”

At Friday’s rally to support the coup, Malians carried signs decrying the former colonizer: “This is not a coup d’etat. It’s a revolution of the people,” “Stop the genocide by France in Mali,” “Death to France and its Allies,” and “Down with France and its governor.”

Africa specialist Marc-Antoine Perouse de Montclos disputes Macron’s contention that an international terror network in the Sahel puts Europeans at risk.

In his book “A Lost War, France in the Sahel,” he contends that French authorities have ignored local realities, like inter-communal vengeance and armies operating brutally with impunity, to promote the narrative of jihadis with direct links to Iraq and Syria.

A future French exit strategy may be as elusive as victory, according to him.

“When do you decide the jihadi threat is weak enough?” Guichaoua asked, and local armies are strong enough to take over the job? “We need measurable criteria.”

The head of the French joint chiefs of staff, Gen. Francois Lecointre, conceded that determining the end of engagement will be “complicated.” He foresees no victory hurrah.

“We will never achieve definitive victory,” Lecointre said on France-Inter radio. “Never will the armies march as victors under the Arc de Triomphe.”

___

AP journalists Baba Ahmed in Bamako, Mali, and Carley Petesch in Dakar, Senegal, contributed.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.