In neighbouring Nigeria, the army meanwhile said it had killed 19 Boko Haram militants in separate fighting in northeast Borno state, while two soldiers suffered gunshot wounds.
In the Niger fighting, "hundreds of assailants" attacked a military post in the Niger town of Bosso on Friday evening, the defence ministry said in a statement that gave a "provisional toll" of 30 Nigerien and two Nigerian soldiers killed and 67 wounded.
"Boko Haram elements effectively took control of the town temporarily, but now they were dislodged," a security source said.
Local resident and former MP Elhaj Aboubacar said: "They drove up at twilight, shouting Allahu Akbar (God is Great), they fired a lot of shots and torched many places in Bosso."
More From This Section
"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 situation is under control and calm has returned," the defence ministry said, adding that a "mopping up" operation was underway by land and air.
The Islamists frequently stage cross-border raids from their stronghold in neighbouring Nigeria.
Boko Haram's seven-year insurgency has devastated infrastructure in Nigeria's impoverished northeast region and forced around 2.1 million people in Nigeria to flee their homes, according to the UN's refugee agency.
The unrest has left at least 20,000 people dead in Nigeria and made more than 2.6 million homeless.
In the latest clashes there 19 Boko Haram militants were killed in Borno, according to the military.
Acting upon an intelligence report on the presence of Boko Haram fighters in the militants' Chukungudu camp, Nigerian troops and civilian JTF (joint task force) members launched the attack yesterday.
The two soldiers who suffered gunshot wounds were said to be responding to treatment.