The soldiers said "all institutions" in Niger would be suspended, borders closed, and a curfew imposed "until further notice" from 10 pm to 5 am.
Soldiers claim to have overthrown Niger's government following an apparent coup in the West African nation on Wednesday when members of the Presidential Guard detained President Mohamed Bazoum.
"Members of the elite guard sealed off access to the president's residence and offices in the capital Niamey, and after talks broke down, refused to release him," a presidential source said.
The soldiers said "all institutions" in the country would be suspended, borders closed, and a curfew imposed "until further notice" from 10 pm to 5 am.
"We, the defence and security forces have decided to put an end to the regime" of President Bazoum, Colonel-Major Amadou Abdramane said in a televised address late Wednesday.
"This follows the continued deterioration of the security situation, poor economic and social governance," he added, surrounded by nine other uniformed soldiers.
Regional and global leaders have called for the release of Bazoum, who entered office two years ago in Niger's first peaceful transition of power since independence from France in 1960.
"The president of neighbouring Benin, Patrice Talon, will head to Niamey for mediation efforts," the head of the Economic Community of West African States (Ecowas) said.
One of a dwindling group of pro-Western leaders in the Sahel, Bazoum was elected in April 2021, taking the helm of a country burdened by poverty and militia insurgencies.
In a message on Twitter, which is being rebranded as X, the president's office said, "Elements of the Presidential Guard (PG) had a fit of temper... (and) tried unsuccessfully to gain the support of the national armed forces and the national guard."
"The army and national guard are ready to attack the elements of the PG who are involved in this fit of temper if they do not return to a better disposition," the presidency said.
"The president and his family are well," it added.
Hours after his detention, Bazoum's supporters had tried to approach the official complex, but were dispersed by members of the Presidential Guard who fired warning shots, an AFP reporter saw.
One person was hurt, but it was not immediately clear if he was injured by a bullet or from falling as the crowd scattered.
The parties of Niger's ruling coalition in Niamey denounced "a suicidal and anti-republican madness" in a statement, saying that "certain elements of the presidential guard sequestered the President" and his family, as well as the interior minister.
Condemnation also poured in from beyond the nation's borders.
Ecowas and the African Union both decried what they called an "attempted coup d'etat".
Ecowas called for Bazoum's immediate and unconditional release and warned all those involved would be held responsible for his safety.
The European Union said it "associates itself" with the Ecowas statement and attacked "any attempt to destabilise democracy and threaten the stability" of Niger.
US Secretary of State Antony Blinken said he had spoken to Bazoum to offer Washington's support, while UN Secretary-General Antonio Guterres said he "strongly condemns the unconstitutional change in government" in Niger.
Saudi Arabia's foreign ministry said it was "following with great concern the developments" in the country, and the foreign minister of Niger's former colonial power France, Catherine Colonna, condemned "all attempts to take power by force".
President Talon was expected to arrive in Niamey on Thursday, after a meeting in Abuja on Wednesday with Nigerian President Bola Ahmed Tinubu.
Tinubu said Talon would mediate with both the Presidential Guard and Bazoum, with a view to finding an agreement.
The landlocked Sahel state has experienced four coups since its 1960 independence, and numerous other attempts.
Bazoum, a former interior minister, was the right-hand man to former president Mahamadou Issoufou, who voluntarily stepped down after two terms.
An attempted coup took place just days before Bazoum's inauguration, according to a security source at the time.
Several people were arrested, including the suspected ringleader. Five people were jailed in February for 20 years.
"A second bid to oust Bazoum occurred last March while the president was in Turkey", according to a Niger official, who said an arrest was made. The authorities have never commented publicly on the incident.
The nation of 22 million is two-thirds desert and frequently ranks at the bottom of the UN's Human Development Index, a benchmark of prosperity.
Niger is struggling with two militia campaigns -- one in the southwest, which swept in from Mali in 2015, and the other in the southeast, involving militias from northeastern Nigeria.
Hundreds of thousands of people have fled their homes, stoking a humanitarian crisis and further straining the economy.
The poorly equipped military is receiving training and logistical support from the United States and France, which have bases there.