Niger's military rulers announced on Sunday that they had closed the country's airspace, warning that any attempt to breach it would meet with an "energetic and immediate response".
"Faced with the threat of intervention, which is becoming clearer through the preparation of neighbouring countries, Niger's airspace is closed from this day on Sunday … for all aircraft until further notice," the country's new rulers said in a statement.
Niger edged closer to conflict on Sunday as the deadline threatening military intervention set by the Economic Community of West African States expired.
Ecowas wants the commanders of the coup, which removed the democratically elected president Mohamed Bazoum and installed Gen Abdourahamane Tchiani on July 30, to step down.
It is also demanding the release of Mr Bazoum, who said in an opinion piece in The Washington Post last week that he was being held hostage.
Ecowas countries on July 30 closed borders with Niger and later set August 6 as a deadline to restore democracy.
The bloc has also backed imposing sanctions and Nigeria, which holds the rotating presidency, has cut off electricity exports to the country.
Niger evacuation flights land in Europe - in pictures
Worsening the risk of wider violence in the impoverished West African state – one of the world’s poorest – Mali and Burkina Faso said they would confront any intervention against their neighbour.
France, which has about 1,500 troops in Niger who were helping the former government fight extremists, has also said it would back force if the generals do not relinquish power.
"We want diplomacy to work and we want this message clearly transmitted to the leaders of the junta in Niger that we are giving them every opportunity to reverse what they have done," said Abdel Fatau Musah, Ecowas Commissioner for Political Affairs, Peace and Security.
The bloc previously staged a military intervention in The Gambia in 2017, sending a force of 7,000 to remove president Yahya Jammeh, who was holding on to power illegally after losing an election.
Operation Restore Democracy was a success for Ecowas, although some of its previous interventions, in Guinea-Bissau and Mali, ended in failure.
"All the elements that will go into any eventual intervention have been worked out, including how and when force would be deployed,” an Ecowas statement said, after a three-day meeting between heads of armed forces.
France said it would "firmly" back whatever course of action Ecowas took after the deadline expired.
Mr Bazoum won an election in 2021 that ushered in Niger's first transfer of power from one civilian government to another.
In Senegal, Foreign Minister Aissata Tall Sall told journalists in the capital Dakar that "Senegalese soldiers have to go, these coups d'etat must be stopped”.
But not all politicians in Ecowas countries are convinced.
Senior Nigerian politicians have urged President Bola Tinubu to reconsider the threatened military intervention.
Senators on Saturday urged regional leaders to give prioritity to diplomacy over a military operation, at least for now.
The junta that seized power in Niger on July 26 has rejected all calls to restore democracy and warned against any foreign interference.
Mr Tinubu is current head of Ecowas, where Nigeria has long been the most influential member and has the largest army.
Any military action lasting longer than one week would have to be approved by the senate of the country, which shares a long, porous border and cultural ties with Niger.
While condemning the coup, Nigeria's Senate called on Ecowas leaders “to strengthen their political and diplomatic options and other means with a view to resolving the political impasse”, its President Godswill Akpabio said.
Senegal’s government also faced opposition at the weekend after it said last week it would contribute troops to an Ecowas force.
A military intervention on top of the already harsh sanctions imposed on Niger – which have sent prices soaring in the impoverished country – weakens its ability to respond to extremist groups, putting the whole region at risk, opposition parliamentarian Thierno Alassane Sall told politicians in Dakar on Saturday.
“We’re an Ecowas member but that doesn’t mean we should give a syndicate of heads of state a carte blanche to start a war that’s likely to be the deadliest ever in our region, and risks dividing West Africa in two,” Mr Sall said.