The attack was carried out by heavily-armed terrorists in the western Tillaberi region. "A substantial number of terrorists were neutralised," the defence ministry said. Niger extended a partial emergency in place since 2017 for another three months.
Hundreds of militants attacked a Niger military camp near the border with Mali with shelling and mortars, killing 71 soldiers, the defence ministry said Wednesday.
Tuesday's attack in Inates in the western Tillaberi region was the deadliest on Niger's military since the country's militant violence began in 2015.
"Sadly, we regret to announce the following toll: 71 military personnel killed, 12 injured. Others missing," the defence ministry said in a statement aired on national television.
The attack was carried out by "heavily armed terrorists estimated to number many hundreds", the statement said, adding that "a substantial number of terrorists were neutralised".
The fighting lasted three hours, combining artillery fire with "the use of kamikaze vehicles by the enemy".
An earlier toll from a security source put the number killed in the assault at more than 60.
"The terrorists bombarded the camp with shelling and mortars," that source said. "The explosions from ammunition and fuel were the cause of the heavy toll."
The source did not say which group was responsible for the deadly assault.
Niger forces are fighting against Boko Haram militants on the southeast border with Nigeria and militants allied with the Daesh in the west near Mali and Libya.
Niger President Issoufou Mahamadou cut short a visit to a peace and security conference in Egypt to return to Niamey, the presidency said on Twitter.
Army reinforcements were rushed to the scene and the situation on Wednesday was "under control" the defence ministry said, stressing that a search for the assailants was under way, though they had "fled beyond our borders".
Tuesday's attack prompted French President Emmanuel Macron to postpone a meeting scheduled for next week in the southwestern French town of Pau, where he and five presidents from the Sahel were due to discuss security in the region.
The meeting will now take place early next year.
Niger is part of a five-nation anti-militants task force known as the G5, set up in 2014 with Burkina Faso, Mali, Mauritania and Chad.
Attack in Agando
Three Niger soldiers and 14 militants were also killed on Monday in an attack on another army post in Agando in the western Tahoua region, the defence ministry said.
Heavily-armed "terrorists" in a dozen 4x4 vehicles led the attack early Monday morning on the military post in Tahoua, the ministry statement said.
Niger's council of ministers has extended for another three months a state of emergency in place since 2017 in several departments to fight against militant attacks, handing additional powers to security forces.
Thousands of civilians and soldiers have died in violence across the vast Sahel region, which began when militants revolted in northern Mali in 2012.
The conflict has since spread to the centre of Mali and to neighbouring Burkina Faso and Niger.
Attacks continue despite the 4,500 French troops deployed in the region as part of Operation Barkhane to help local forces.
Thirteen French soldiers were killed in Mali last month when two helicopters collided during an operation against militants in the country's restive north in the heaviest single loss for the French military in nearly four decades.