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 defence ministry said on Saturday.
It was the deadliest attack carried out in Niger by the terrorist group since April 2015, when at least 74 people, including 28 civilians, were killed at the Lake Chad island of Karamga.
"The counter-offensive conducted early this morning helped to retake control of all the positions in the city of Bosso. The situation is under control," the defence ministry said in a statement. "A sweep is ongoing in the area with the mobilisation of all land and air means".
Seven others from Niger and eight from Nigeria were injured in the attack that targeted a military post, according to the ministry, which reported "several deaths" among the assailants.
In a statement released later, Boko Haram claimed killing 35 soldiers and wounding nearly 70 from the Nigerien and Nigerian armies, according to the US-based extremist monitoring service SITE. Boko Haram also said it seized a "large quantity of weapons and ammunition" during the attack.
The town of Bosso is part of the Diffa region, where many refugees and internally displaced people have sought shelter from Boko Haram violence elsewhere. The region has been targeted numerous times in attacks blamed on the militants.
Around 200 people took the streets on Saturday in the capital Niamey to voice support for the population in Diffa and to ask for an audit of military spending as they denounced a "lack of results" from army action.
Along with Chad, Cameroon, Nigeria and Benin, Niger has contributed troops to an 9,000-strong regional task force dedicated to fighting the group that has so far survived attempts by African armies to destroy it.
"The terrorist threat remains a concern to our subregion," said Senegal's president Macky Sall, the incumbent chairman of the Economic Community of West African States (Ecowas).
"We must face it by combining all our resources in a comprehensive long-term perspective," he told an Ecowas summit in Dakar on Saturday.
"We must at the same time remove any confusion in terminology: there is no 'Islamic state' in West Africa matching the terrorist aims of Boko Haram. Boko Haram remains Boko Haram and Islam has nothing to do with terrorism and its killing spree".
Boko Haram has been trying to establish a state adhering to strict Sharia law in northeast Nigeria since 2009. About 2.1 million people have been displaced and thousands have been killed during the seven-year insurgency.