Former Boko Haram members
Former Boko Haram members gather in front of Chadian soldiers in Ngouboua, Chad, on April 22, 2015. The Nigerian military announced on April 6, 2016, that at least 800 fighters have surrendered in the last three weeks. REUTERS/Moumine Ngarmbassa

Thirty soldiers from Niger and two from Nigeria were killed in a Boko Haram attack by “hundreds of assailants” on Friday on the southeastern town of Bosso close to the border with Nigeria, the Niger Defense Ministry said Saturday.

“The counteroffensive conducted early this morning helped to retake control of all the positions in the city of Bosso. The situation is under control,” the ministry added. “A sweep is ongoing in the area with the mobilization of all land and air means”.

Seven others from Niger and eight from Nigeria were injured in the attack, according to the ministry, which reported “several deaths” among the assailants.

Bosso is part of the Diffa region, which is home to many refugees and internally displaced people who have sought to avoid Boko Haram violence elsewhere. The region has been targeted numerous times in attacks blamed on the militants.

Six people were killed last month in the village of Yebi, 4 kilometers (2.5 miles) from Bosso, in an attack thought to have been carried out by Boko Haram.

The group, headquartered across the border in northeastern Nigeria, wants to create an emirate and impose a strict interpretation of Islamic law.