Members of Niger’s presidential guard surrounded the presidential palace Wednesday in what African organizations called an attempted coup against the country's democratically elected leader. The U.S. said the rebelling soldiers had detained President Mohamed Bazoum.

A tweet from the account of Niger's presidency reported that members of the elite guard unit engaged in an "anti-Republican demonstration" and unsuccessfully tried to obtain support from other security forces. It said Bazoum and his family were doing well but that Niger's army and national guard "are ready to attack" if those involved in the action did not back down.

However, the commissions of the African Union and the Economic Community of West African States described the events in Niger's capital as an effort to unseat Bazoum, who was elected president two years ago in the nation's first peaceful, democratic transfer of power since its independence from France in 1960.

5 SOLDIERS DEAD IN NORTHERN NIGER AMBUSH

The governments of France and the United States also voiced concern and urged the participating guardsmen to change course. Bazoum's administration has made Niger a key Western partner in the fight against Islamist extremism in Africa's Sahel region.

"We strongly condemn any effort to detain or subvert the functioning of Niger’s democratically elected government, led by President Bazoum," White House National Security Advisor Jake Sullivan said. "We specifically urge elements of the presidential guard to release President Bazoum from detention and refrain from violence."

Streets surrounding the presidential palace in the capital, Niamey, were blocked off Wednesday, as were some government ministries. In the early evening, hundreds of people chanting "No coup d’etat" marched in support of the president. Multiple rounds of gunfire that appeared to come from the presidential palace dispersed the demonstrators and sent people scrambling for cover, according to an Associated Press reporter at the scene..

"We are here to show the people that we are not happy about this movement going on; just to show these military people that they can’t just take the power like this," protester Mohammed Sidi said. "We are a democratic country, we support democracy and we don’t need this kind of movement."

Someone close to the president who wasn’t authorized to speak to the media told the AP the presidential guard surrounded Bazoum’s house when he and his wife were inside on Wednesday morning and that negotiations were underway between the parties.

Mohamed Bazoum

Nigerien President Mohamed Bazoum is seen at the presidential palace in Niamey, Niger, March 16, 2023. (Boureima Hama/Pool Photo via AP/File)

Within hours, there was a military buildup outside the headquarters of the state radio and television networks. Pickup trucks mounted with machine guns lined the roads to both buildings, with members of the army and national guard waving cars through.

The streets of Niamey were bustling as usual, with many residents refusing to discuss the situation until there was more clarity. Some international security forces in the country were ordered put on lockdown. The United Nations said its 1,500 staff members in Niger were safe but had to suspend their regular work.

U.N. Secretary-General Antonio Guterres "calls on all actors involved to exercise restraint and to ensure the protection of constitutional order," spokesman Stephane Dujarric said.

Threats to Bazoum's leadership would undermine the West's efforts to stabilize Africa's Sahel region. U.S. Secretary of State Antony Blinken visited Niger in March, seeking to strengthen ties with a country where extremists have carried out attacks on civilians and military personnel but the overall security situation was not as dire as in neighboring nations.

Mali and Burkina Faso have had four coups since 2020, and both are being overrun by extremists linked to al-Qaida and the Islamic State group. Mercenaries from the Russian military company also have deployed in those countries.

"Niger and President Bazoum has been the West’s only hope on the Sahel region to contain jihadists and Russia’s rising influence," said Ulf Laessing, head of the Sahel program at the Konrad Adenauer Foundation. "Western countries have been showering Niger with aid programs, from military to development cooperation. Even if Bazoum survives this, the reputation of Niger among Western policymakers as a stability anchor for the Sahel is damaged."

Nigerian President Bola Tinubu, who was selected this month as the ECOWAS Commission's chairman, said the regional bloc’s leadership would resist any attempt to unseat Niger's government.

"It should be quite clear to all players in the Republic of Niger that the leadership of the ECOWAS region and all lovers of democracy around the world will not tolerate any situation that incapacitates the democratically elected government of the country," Tinubu said in a statement he issued in Abuja. "We will do everything within our powers to ensure democracy is firmly planted, nurtured, well rooted and thrives in our region."

WEST AFRICA FACES DIRE HUMANITARIAN CONSEQUENCES AMIDST 1,800 TERRORIST ATTACKS, 4,600 DEATHS IN 6 MONTHS

After meeting with Tinubu in Abuja, President Patrice Talon of Benin left for Niger as part of ECOWAS-led mediation efforts. "I believe that all means will be used, if necessary, to restore constitutional order in Niger, but the ideal would be for everything to happen in peace and harmony," Talon said.

The African Union also called on Nigeriens and Africans to "join their voices in unanimous condemnation of this coup attempt, and for the immediate and unconditional return of the felon soldiers to their barracks."

Security analysts said another coup attempt would worsen regional instability.

"The repeated coups in the Sahel signaled the beginning of a new era: an era of militaries being in control, and the end of what it was a hopeful democracy," said Rida Lyammouri, senior fellow at the Policy Center for the New South, a Morocco-based think tank. "As we are seeing in Burkina Faso and Mali, coups did not really address security issues, which was the justification of these coups."

CLICK HERE TO GET THE FOX NEWS APP

"Military coups are simply bad and send countries concerned backward rather than forward toward stability and (a) prosperous future," Lyammouri said.