France is recalling its ambassador to Niger, all staff of the French Embassy, and all French troops in the West African country, President Emmanuel Macron said.

Iran PressEurope: The announcement is a significant blow to France's policy in Africa, after French troops pulled out of neighboring Mali and Burkina Faso in recent years following coups there. 

France has maintained some 1,500 troops in Niger since the July coup, and had repeatedly refused an order by the new junta for its ambassador to leave, saying that France didn't recognize the coup leaders as legitimate.

"The Ambassador in Niamey, as well as all staff of the embassy, will return to France in the coming weeks or months," Macron told a French broadcaster on Sunday.

He added that the military cooperation with Niger is "over" and French troops will leave the country by the end of the year.

The French embassy in Niamey and French military bases have been the focus of mass protests in the capital city.