Thirty soldiers from Niger and two from Nigeria have been killed in clashes with Boko Haram militants in Niger, the country's defence ministry says.
It says "hundreds of assailants" attacked a military post in the south-eastern town of Bosso, on the Nigerian border, on Friday night.
A counter-attack on Saturday morning allowed government troops to retake all positions in Bosso, the ministry says.
It says there were several dead and injured "on the enemy's side".
Boko Haram has not commented on the Nigerien defence ministry's statement.
The Islamist group is based in Nigeria but is being tackled by a multinational force, including soldiers from Niger.
Niger's President Mahamadou Issoufou has been praised in the West for rallying neighbouring countries to fight Boko Haram.
In March, six soldiers from Niger's army were killed in a Boko Haram ambush in the south-east.
Boko Haram at a glance:
- Founded in 2002, initially focused on opposing Western-style education - Boko Haram means "Western education is forbidden" in the Hausa language
- Launched military operations in 2009
- Thousands killed, mostly in north-eastern Nigeria, hundreds abducted, including at least 200 schoolgirls
- Joined so-called Islamic State, now calls itself IS's "West African province"
- Seized large area in north-east, where it declared caliphate
- Regional force has retaken most territory last year