At least 35 people have been killed in two separate gun battles between Nigerian security forces and Islamist sect Boko Haram in northeast Borno state, the army said on Monday.
Boko Haram, which wants to impose sharia law in Nigeria's north, and other spin-off Islamist groups have become the biggest threat to stability in Africa's top oil exporter.
In mid-May, President Goodluck Jonathan declared a state of emergency and launched an offensive against the group in its stronghold in the northeast. The insurgency was initially weakened but remains active and is stretching the army.
Boko Haram gunmen on Sunday attacked a police base in Bama, a town close to the Cameroon border that has been frequently hit by violence in recent months.
"Troops have successfully repelled Boko Haram terrorist attacks on a police base in Bama ... on 4 August," said military spokesman Sagir Musa.
Musa said one policeman and 17 members of Boko Haram were killed during the fighting, while two soldiers were injured.
He said four trucks, three motorbikes, dozens of explosive devices, three rocket-propelled grenades, 10 AK47 rifles and over 100 rounds of ammunition were recovered from the Islamists.
Military base under attack
Boko Haram members also attacked a military base in the town of Malam Fatori, triggering a gun battle that left two soldiers and 15 of its members dead, Musa said.
Nigerian police and military often play down their losses and those of civilians, security sources say.
Boko Haram launched its insurgency in 2009 and has become increasingly sophisticated, learning bomb-making techniques from al Qaeda-linked militants in the Sahara to the north of Nigeria.
Civilian vigilantes have sprung up to help Nigerian forces identify and arrest Boko Haram members but there are concerns among some northeast residents and security experts that the spread of vigilantes could further break down law and order.
Five people died in clashes on Sunday between two such vigilante groups over control of the town of Biu in Borno state, witness Suleiman Barka told Reuters by phone.
Nigeria began last week withdrawing some of its 1,200 troops from Mali to support security operations at home.
Meanwhile, the prosecutor of the International Criminal Court says that after a preliminary investigation she believes that acts attributed to the Nigerian Islamist group Boko Haram are likely crimes against humanity.
Fatou Bensouda says the acts include murder and persecution. But she will only move to a full-fledged investigation after further study and depending on whether Nigerian authorities prosecute "those who appear to bear the greatest responsibility."
Her report issued Monday in The Hague, Netherlands, is based on evidence gathered through December 2012.