NIAMEY, Niger — The European Union has cut off financial support to Niger, and the United States has threatened to do the same after military leaders this week announced they had overthrown the democratically elected president, Mohamed Bazoum.

Niger is one of the poorest countries in the world, receiving close to $2 billion a year in official development assistance, according to the World Bank.

It is also a key security partner of Western countries such as France and the United States, which use it as a base for their efforts to contain an Islamist insurgency in West and Central Africa’s Sahel region. Previously seen as the most stable country among several unstable neighbors, Niger is the world’s seventh-biggest producer of uranium.

Niger’s foreign allies so far have refused to recognize the new military government led by General Abdourahamane Tchiani, previously head of the presidential guard, who officers declared head of state on Friday.

Bazoum has not been heard from since early Thursday when he was confined within the presidential palace, although the European Union, France and others say they still recognize him as the legitimate president.

“In addition to the immediate cessation of budget support, all cooperation actions in the domain of security are suspended indefinitely with immediate effect,” EU foreign policy chief Josep Borrell said in a statement.

Niger is a key partner of the European Union in helping curb the flow of migrants from sub-Saharan Africa. The EU also has a small number of troops in Niger for a military training mission.

The EU allocated $554 million from its budget to improve governance, education and sustainable growth in Niger over 2021-2024, according to its website.

The United States has two military bases in Niger with some 1,100 soldiers, and it also provides hundreds of millions of dollars to the country in security and development aid.

“The very significant assistance that we have in place for people in Niger is clearly in jeopardy,” said U.S. Secretary of State Antony Blinken. U.S. support depends on the continuation of democratic governance, he said.

The United Nations said the coup has not affected its deliveries of humanitarian aid.

It is unclear how much support the military junta has among Niger’s population. Some crowds came out in support of Bazoum on Wednesday, but the following day coup supporters were demonstrating in the streets.

The Economic Community of West African States, or ECOWAS, will hold an emergency summit in Nigeria on Sunday to discuss the situation.

After an emergency meeting on Friday, the African Union’s Peace and Security Council issued a statement demanding the military return to their barracks and restore constitutional order within 15 days. It did not say what would happen after that.