ABIDJAN, Ivory Coast — French forces killed 33 militants on Saturday in Mali near the border with Mauritania, President Emmanuel Macron of France said.

“This morning, thanks to an engagement by our soldiers and the Barkhane forces, we were able to neutralize 33 terrorists, take one prisoner and free two Malian gendarmes who had been held hostage,” Mr. Macron said during a speech in Ivory Coast. The French deployment against terrorism in the region is called Operation Barkhane.

France, the former colonial power, is the only Western country with a significant military presence waging counterinsurgency operations in Mali and the wider Sahel, the arid region of West Africa south of the Sahara. Islamist militants, some allied with the Islamic State, have carried out attacks in several countries, terrorizing populations and undermining governments.

The French Army command confirmed the death toll in the operation on Saturday, which it said took place overnight near the Mauritanian border, about 90 miles northwest of the town of Mopti in Mali.