Leaders of the coup in Niger declared General Abdourahamane Tiani as the new head of state on Friday, and said they had suspended the constitution and dissolved all former institutions after overthrowing President Mohamed Bazoum.
Tiani was the head of the presidential guard, whose soldiers shut Bazoum in his palace on Wednesday and said it had ousted him because of bad governance and worsening security.
The general appeared on state television on Friday with a banner on the screen that described him as the president of a newly formed military council, the National Council for Safeguarding the Homeland (CNSP).
"The President of the CNSP is the head of state. He represents the state of Niger in international relations," an officer said, reading out a statement.
The constitution has been suspended and the government dissolved, and the CNSP will exercise all legislative and executive power, the statement said.
African countries, Western powers, regional and international organizations have reacted with alarm to the coup in Niger, insisting that Bazoum be freed and constitutional order restored.
Before the uprising this week, it was seen as the West's most stable ally in a region beset by insurgents. A number of foreign troops are based there, including French and American forces.
Niger is also the world's seventh-biggest producer of uranium, the radioactive metal widely used for nuclear energy and in nuclear weapons, as well as for treating cancer.
Niger borders three countries - Mali, Burkina Faso and Chad - that have also experienced military coups in the last two years.
France said on Friday morning that the coup was not "definitive" and urged those responsible to reinstate Bazoum.
But after days of confusion over who was in charge, Tiani and his camp appeared to have consolidated power as they read out a series of decrees on state television.
"The action of the CNSP is motivated by the sole desire to preserve our dear homeland," Tiani said.
Like the military rulers of Mali and Burkina Faso, he justified the coup by saying that the government had been failing in its fight against insurgents. He accused it of not collaborating with the leaders of those states.
Militants linked to al Qaeda and Islamic State have been spreading across West Africa's Sahel region for years. Niger so far has held them off better than Mali and Burkina Faso, where violence has only worsened since the military coups.
Foreign countries have not announced any plan to intervene in Niger but Tiani warned against any attempts to extract President Bazoum, who has been held with his family in the presidential palace since Wednesday morning.
He said a foreign military intervention would result in "the massacre of the Niger population and chaos".
The Economic Community of West African States (ECOWAS) will hold an emergency summit in Nigeria on Sunday to discuss the situation.
Niger will be a test for the regional bloc, which has struggled to convince soldiers to give back power after the latest wave of coups in member states Mali, Guinea, and Burkina Faso.
The European Union and United States have already threatened to cut support to Niger, which is a major recipient of Western security aid and a key partner of the European Union in containing irregular migration from sub-Saharan Africa
"Any breakdown in the constitutional order will have consequences for cooperation between the EU and Niger, including the immediate suspension of all budgetary support," EU foreign policy chief Josep Borrell said on Friday.
U.S. Vice President Kamala Harris said cooperation with Niger's government was contingent on its "continued commitment to democratic standards".
Germany, Italy, France, and the United States have troops in Niger on military training and counter-insurgency missions.
German Defence Minister Boris Pistorius said the situation was still dynamic and the priority was the safety of soldiers on the ground.
"It is not yet clear how the leadership will position itself on the engagement of Western partners in the future," he told Spiegel news magazine.
An aerial view of the streets in the capital Niamey, Niger July 28. REUTERS
Supporters of the coup set fire to ruling party HQ while hundreds of them gather in front of the National Assembly in the capital Niamey, Niger July 27. REUTERS