Thirty-two soldiers were killed when Boko Haram stormed a southeastern town in Niger, near Nigerian border, on Friday, the Defence Ministry said in a statement.
Hundreds of Boko Haram militants attacked Bosso, killing thirty soldiers from Niger and two from Nigeria, in the deadliest Boko Haram attack since April 2015.
Friday’s attack targeted a military post and also injured seven others from Niger and eight from Nigeria, several assailants were also killed during the counter-attack by soldiers.
"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," ministry's statement said.
"A sweep is ongoing in the area with the mobilisation of all land and air means."
Boko Haram claimed responsibility for the attack, saying the group killed 35 soldiers and injured nearly 70 people including both civilians and soldiers from Nigeria, said a US-based monitoring service SITE.
"They burned houses, looted food stores and shops, and burned the military post before fleeing with weapons and ammunition," said Adam Boukarna, a deputy in Bosso. The attack forced residents to move to Tomour, about 30 kilometres to the west, he added.
Hundreds of people took to the streets on Saturday in the capital city of Niamey and expressed support for the people in Bosso.
They said the army has failed to produce results and demanded an audit of military spending.
Bosso is located in Diffa region and provides shelter to many refugees and internally displaced persons who have escaped from Boko Haram atrocities.
"The terrorist threat remains a concern to our subregion," Senegal's President Macky Sall said.
Sall, who is also the incumbent chairman of the Economic Community of West African States (Ecowas), stated at its summit on Saturday that, "We must face it by combining all our resources in a comprehensive long-term perspective."
In April 2015, Boko Haram had killed at least 74 people, including 28 civilians, at the Lake Chad island of Karamga.