At least 12 soldiers and "dozens of terrorists" were killed in a battle in western Niger, the defense ministry said on Sunday, in the conflict-wracked "three borders" zone.
Another eight soldiers were wounded in the clash with "hundreds of armed terrorists" about 5 kilometers from Fantio, it said in a statement.
Several motorbikes used by the attackers were destroyed and communications equipment recovered, the statement added.
The soldiers "defended themselves ferociously," killing dozens of attackers before being overwhelmed by their numbers, the ministry said.
Reinforcements from nearby positions and air support finally forced the enemy to retreat.
Fantio is a small rural community in the Tera district of Tillaberio region regularly targeted 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 Ramadan, the ministry said.
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.
Besides 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.