At least 30 soldiers from Niger and two Nigerian troops were killed in a Boko Haram attack on Niger's border with Nigeria, Niger's defence ministry said.

"On Friday, hundreds of assailants of Boko Haram attacked" the position of the army of Bosso, the ministry said in a statement on Saturday, giving a "provisional toll" of 32 soldiers killed and 67 wounded.

"On the enemy's side, several dead and injured were taken away," the ministry said.

"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", it added.

READ MORE: One million children forced from school by Boko Haram war

Local resident and former MP Elhaj Aboubacar told the AFP news agency that the gunmen "drove up at twilight, shouting Allahu Akbar [God is great], they fired a lot of shots and torched many places in Bosso.

"We don't know where our military went, but one thing is for sure, Boko Haram were able to do what they liked until dawn," Aboubacar said.

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 Boko Haram fighters.

Around 200 people took to the streets on Saturday in Niger's capital Niamey to voice support for Diffa's population, calling for an audit of military spending as they denounced a "lack of results" from army action.

Civil society groups marched in Niamey to show solidarity after the latest attack [Tagaza Djibo/Reuters]

Regional violence

Since February 2015, Niger has been plagued by Boko Haram attacks in its southeast region.

The armed group frequently stages cross-border raids from their stronghold in neighbouring Nigeria.

The war between Boko Haram and the Nigerian government has left at least 20,000 people dead in six years and made more than 2.6 million homeless.

The Lake Chad region - which borders Nigeria, Chad, Cameroon and Niger - has been frequently targeted by Boko Haram and all four countries have formed a coalition along with Benin to fight the group.

Inside Story - Can Boko Haram be defeated?

Source: Agencies