Five Nigerian soldiers and more than 15 Boko Haram fighters were killed when the jihadists attacked an army base in the remote northeast where the group has been fighting for an Islamic state, a military source said on Sunday.
Boko Haram attacked an army brigade in Buni Yadi in Yobe state late on Saturday, an army spokesman said by text message, without giving a casualty figure.
"Five soldiers lost their life in the attack though more than 15 Boko Haram were killed by troops," the military source said.
Several explosions could be heard on Sunday in Maiduguri, capital of Borno state where Boko Haram started its seven-year insurgency that has killed about 15,000 people and displaced more than 2 million.
Officials or medics were not immediately available to give a casualty figure.
In early 2015, Boko Haram controlled an area about the size of Belgium. It has been pushed out of most of that territory over the past year by Nigeria's army and troops from neighboring countries, moving to a base in the Sambisa forest.
Last month, the army said it had taken Boko Haram's key camp in the forest, although the group has staged suicide bombings since then.
Security analysts say the group's ability to carry out attacks in neighboring Niger, Cameroon and Chad suggests it has multiple bases.