The new junta’s move to cut ties with Niger’s former colonial power came amid threats of a military intervention by other West African states.