Niger says it thwarted an attempted coup just days before the inauguration of the next president.
Armed attackers tried to seize the presidential palace in the early hours of Wednesday but were fought off by the presidential guard, sources said.
President-elect Mohamed Bazoum is due to be sworn in on Friday.
It will be the first transfer of power between two democratically elected presidents in Niger since the country became independent in 1960.
Niger is the world’s poorest nation, according to the UN’s development rankings for 189 countries. It has seen four military coups, most recently in 2010.
Residents in the capital Niamey reported hearing bursts of gunfire at around 03:00 local time (02:00 GMT) early on Wednesday.
The attackers, reportedly from a nearby airbase, fled after being met with gunfire and shelling.
A government spokesman said a number of arrests have been made and investigators are working to identify who was responsible.
“The government condemns this cowardly and retrograde act which seeks to jeopardise the democracy and the rule of law to which our country is resolutely committed,” he said.
The current President, Mahamadou Issoufou, is stepping down after two five-year terms. His successor, Mr Bazoum, is a former interior minister from the governing party.
The democratic transfer of power in a country prone to coups has won international praise, but Mr Bazoum’s rival Mahamane Ousmane rejected the result of the election.
There have been increasing attacks by jihadist groups as well as political tensions in the country following Mr Bazoum’s victory.
Earlier this month Niger saw the worst militant attack in its history, with 137 people killed when suspected jihadists targeted three villages.