Seventeen Niger soldiers were killed on Tuesday in an attack by suspected jihadists near the country's western border with Burkina Faso, the defence ministry said.
An army detachment was "the victim of a terrorist ambush near the town of Koutougou", said a ministry statement published late Tuesday.
It added that another 20 soldiers had been wounded, six seriously, with all the casualties evacuated to the capital Niamey.
More than 100 assailants were "neutralised" during their retreat, the army said.
A jihadist insurgency has plagued Africa's Sahel region for more than a decade, breaking out in northern Mali in 2012 before spreading to neighbouring Niger and Burkina Faso in 2015.
The so-called "three borders" area between the three countries is regularly the scene of attacks by rebels affiliated with the Islamic State group and Al-Qaeda.
The unrest across the region has killed thousands of troops, police officers and civilians and forced millions to flee their homes.
Anger at the bloodshed has fuelled military takeovers in all three countries since 2020, with Niger the latest to fall to a coup on July 26 when President Mohamed Bazoum was ousted.
Niger is also facing a jihadist insurgency in its southeast from militants crossing from northeastern Nigeria -- the cradle of a campaign initiated by Boko Haram in 2010.