At least 12 soldiers and "dozens of terrorists" were killed in a battle in western Niger, the defence ministry announced Sunday, in the conflict-wracked "three borders" zone.
Another eight soldiers were wounded in the clash with "hundreds of armed terrorists" five kilometres (three miles) from Fantio, said the ministry statement.
Several motorbikes used by the attackers had been destroyed and communications equipment recovered, the statement added.
The soldiers had "defended themselves ferociously" killing dozens of the attackers before being overwhelmed by their numbers, said the ministry.
Reinforcements from nearby positions and air support had finally forced the enemy to retreat.
Fantio is a small rural community in the Tera district of Tillaberio region regularly targetted by jihadist groups affiliated with al-Qaeda or the Islamic State group.
Five villagers were killed and two others seriously wounded in an attack there in May during the Muslim festival of Eid at the end of the Ramadan, said the ministry.
In late June two civilians, a school director and a retired police inspector, were killed during another raid, during which their killers also stole livestock.
As well as the attacks from jihadist groups such as Islamic State in the Greater Sahara (EIGS) in the west of the country, Niger also has to contend
with Boko Haram and the Islamic State West Africa Province (ISWAP) in the southwest of the country, near the border with Nigeria.
The arid Sahel state is the world's poorest country according to the UN's Human Development Index.