Niger’s President Mohamed Bazoum has issued a defiant message on Twitter after soldiers announced a coup overnight in the West African nation.
Trouble began early on Wednesday when troops from the presidential guard took him captive.
His foreign minister has said the takeover does not have the backing of the whole military, but the army chief has now said he backs the junta.
Mr Bazoum is a key Western ally in the fight against Islamist militants.
The US and France, the former colonial power, both have military bases in the uranium-rich country – and have condemned the coup.
US Secretary of State Antony Blinken called up Mr Bazoum promising Washington’s “unwavering support” and the UN, the European Union and Russia have all called for the president’s immediate release.
Africa Live: Updates on this and other stories from the continent
Putin’s show: Which African leaders will have star role?
Are military takeovers on the rise in Africa?
The 64-year-old, who was elected Niger’s president two years ago, took to Twitter on Thursday morning to say: “The hard-won achievements will be safeguarded. All Nigeriens who love democracy and freedom will see to it.”
After delays due to heavy rain early in the morning, coup supporters took to the streets of the capital, Niamey, some gathering outside the National Assembly. Some in the crowd had Russian flags, while others held up hand-written signs saying: “Down with France” and “Foreign bases out”.
A Russian flag was on show during a pro-coup demonstration held after morning downpours cleared
Others gathered outside the headquarters of the president’s PNDS Tarraya party, with footage showing them stoning and setting fire to vehicles.
They accuse the party of corruption and not doing enough to improve the security situation and end the long-running jihadist insurgency.
Two neighbouring countries, Mali and Burkina Faso, have experienced coups triggered by Islamist uprisings in recent years.
In both countries the new military leaders have moved closer to Russia after falling out with France, which also previously ruled Niger.
A number of well-known pro-Kremlin commentators on Telegram – one of the few major social media platforms not banned in Russia – have been posting comments in support of the coup, saying it is an opportunity for Russia and Wagner to get into Niger.
For the moment, there is no evidence of any Russian involvement in this takeover. Moscow has urged all sides to resolve the dispute peacefully.
The junta has reprimanded France for violating the closure of the country’s borders after a military plane landed at an air-force base on Thursday morning.
It is not clear at the moment who is really in charge of Niger.
The takeover was announced by a spokesman, Col Maj Amadou Abdramane, who said the takeover was instigated by the deteriorating security situation “and poor economic and social governance”.
All the different branches of the security forces were represented during the late-night announcement on national television – an indication that the military is united behind the coup.
Supporters of President Bazoum rallied in Niamey on Wednesday
The turn of events has split people in Niger – and some are shocked and upset.
While it was under way on Wednesday, hundreds of the president’s supporters defied the soldiers to to protest and call for the military to return to the barracks.
They dispersed after warning shots were fired – the only gunfire heard in this bloodless seizure of power.
They have said they will not accept the coup but it is not clear how they will oppose it. They have not called any more streets protests for the time-being.
Analysis box by Frank Gardner, security correspondent
This coup is yet further bad news for French and Western efforts to restore stability to the part of West Africa known as the Sahel. When neighbouring Mali chose to partner up with Russia’s Wagner Group in place of the French, Paris moved its centre of operations in the region to Niger.
This coup, even if it turns out to be short-lived, has shown that even Niger cannot necessarily be relied on to be a permanent safe base. Western influence in the region is shrinking like a water pool in the dry season.
The governments in Burkina Faso, Central African Republic (CAR) and Mali have all decided they would rather work with Russia’s brutal Wagner mercenaries than any Western force. Wagner’s primary interests in Africa have appeared to be more about enriching themselves and extending the Kremlin’s influence than following the Western goals of trying to nurture better governance.
For the two major insurgent groups in the region, those linked to so-called Islamic State and al-Qaeda, this is good news. They thrive on instability, poor governance and local resentment of the government. So a coup in Niger is likely to further hamper efforts to contain them.
2px presentational grey line
Niger’s Foreign Minister Hassoumi Massoudou has called on the population to oppose the takeover.
In an interview with the channel France24, he said that the situation could still be resolved through dialogue and said envoys sent from neighbouring Nigeria were talking to the military.
Benin’s President Patrice Talon is also on a mediation mission on behalf of the West African regional bloc, Ecowas.
The vast arid country on the edge of the Sahara desert – one of the world’s poorest nations – has experienced four coups since independence from France in 1960, as well as numerous attempted coups.