By Edward Mcallister and Anait Miridzhanian

ABUJA, NIGERIA - West African nations on Friday worked on plans for a possible military intervention in Niger following an army coup there although they have not given up hope of a peaceful resolution to a crisis that has shaken the region.

The Nigerien military 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 battling an Islamist insurgency.

The regional bloc ECOWAS ordered the activation of a standby force on Thursday for possible use against the new junta, saying all options including military action were on the table.

It was not clear how big the force would be, if it would actually invade, and which countries would contribute. Security analysts said an ECOWAS force could take weeks or longer to assemble, potentially leaving room for negotiations.

Speaking to reporters on Thursday after a summit of its heads of state in the Nigerian capital Abuja, 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.

Asked how many troops that would involve, an Ivorian army spokesperson said a battalion consisted of 850 troops. Other countries are yet to say how many troops they could provide, if at all.

The coup in uranium-rich Niger, one of the world's poorest countries but a key ally for the West in the fight against Islamist militants in the Sahel region, was triggered by internal politics but has repercussions far beyond its borders.

U.S., French, German and Italian troops are stationed in Niger as part of the fight against the Islamist insurgency.

ECOWAS (Economic Community of West African States) the United Nations and Western countries are putting pressure on the junta to stand down, while military governments in neighbouring Mali and Burkina Faso have said they will defend it.

ECOWAS said on Thursday that all its diplomatic efforts so far had been "defiantly repelled" by the junta.

France said it fully backed all the conclusions of the ECOWAS meeting. But it stayed clear of outlining any concrete support it could give to any potential intervention.

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 and his family. The EU also called for his immediate release.

"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.

Human Rights Watch said it had spoken to Bazoum this week and that the ousted president, who is being held captive by the junta with his wife and son, had told them that his family's treatment in custody was "inhuman and cruel".

"My son is sick, has a serious heart condition, and needs to see a doctor," HRW quoted Bazoum as telling them. "They’ve refused to let him get medical treatment."

HRW said Bazoum told them he had had no electricity since Aug. 2 and had not been allowed to see family and friends who wanted to bring them supplies.