West African nations on Friday forged ahead with plans for a possible military intervention in Niger following the military coup there, although it has not given up the hope of a peaceful resolution to the crisis.

The Nigerien army ousted former President Mohamed Bazoum on July 26, the seventh coup in West and Central Africa in three years and an action that raised the spectre of more unrest in an impoverished region already battling a rampant Islamist insurgency.

The regional bloc ECOWAS on Thursday ordered the activation of a standby force for possible use against the junta, saying it wanted a peaceful restoration of democracy but all options

including military action were on the table.

ECOWAS (Economic Community of West African States) was expected to start putting together a force of thousands of troops after the junta had defied an Aug. 6 deadline to reinstate Bazoum. The junta has said it would defend the country against any foreign attack.

After a summit of its heads of state in the Nigerian capital Abuja, the bloc pledged to enforce sanctions, travel bans and asset freezes on the junta, and activate a regional force.

It was not clear how big the force would be, if it would actually invade, and which countries would contribute.

Speaking to reporters on Thursday, Ivory Coast President Alassane Ouattara said he considered the detention of Bazoum “a terrorist act” and promised to supply a battalion of troops to the force.

Reiterating support for the efforts by ECOWAS, U.S. Secretary of State Antony Blinken said the United States would hold the junta accountable for the safety of Bazoum, his family, and detained members of the government.

The European Union on Friday reiterated concern about the conditions under which Bazoum and his family were being detained.

“President Bazoum has dedicated his life to improve conditions for the people of Niger. Nothing justifies such a treatment,” EU foreign policy chief Josep Borrell said in a statement.

Despite being one of the world’s poorest countries, landlocked Niger, which is more than twice the size of France, is the world’s seventh-largest producer of uranium, a crucial material for nuclear power and in cancer treatments.

Until the coup, it was also an ally for the West after Mali and others turned against former colonial power France in favour of closer ties with Russia.

U.S., French, German and Italian troops are stationed in Niger as part of the fight against the long-running Islamist insurgency that spread across the Sahel region.