Niger's defence ministry said that 17 of its soldiers had been killed in an ambush on Tuesday in a southwest region bordering Burkina Faso.
Attacks in Niger have been falling since 2021 but security remains a major problem, especially in the southwest near the border with neighbouring Mali.
On the Malian side, the departure of French troops last year left a security vacuum that groups linked to IS and Al Qaeda have expanded into.
A detachment of Niger's army was attacked in an ambush next to Torodi commune, the defence ministry said in a statement. It added that more than a hundred "terrorists" were neutralized.
"The swift reaction of the soldiers and the air-land response at the scene of the skirmish enabled the enemy to be dealt with," the statement said.