Spokesman Lt. Col. Muhammed Dole said two soldiers were wounded in the attacks and that several wounded militants fled.
The military said it killed dozens of insurgents in a similar attack in Borno state last week.
In Damaturu on Friday, a police sergeant told The Associated Press that security forces killed 35 extremists and arrested 25 for the loss of 17 soldiers and 10 police officers in the attack on the Yobe state capital, Damaturu, that began overnight and continued Friday morning.
He and other police officers there spoke on condition of anonymity because they are not authorized to give information to reporters.
It started with gunmen in vehicles including an armored personnel carrier attacking the residence of the police anti-terrorist squad, according to resident Musa Ibrahim, who said explosions and gunfire went on for hours.
Another police officer said the militants went on to attack the mobile police base, the police Criminal Investigation Department office and the police commander's office, which all were set ablaze by explosions and razed.
A curfew was declared Friday morning, though most residents remained behind locked doors as the shooting and explosions continued.
"Law-abiding citizens are enjoined to remain calm as the battalion steps up its operation to rid the state of insurgents," said the announcement from Capt. Eli Lazarus, that was broadcast on radio stations.
At least one person did not hear it. Civil servant Hassan Mohammed was driving to his office when he was shot and wounded by an army patrol that accused him of breaking the curfew in the Yobe state capital, Damaturu, according to a police constable. The constable said he escorted the ambulance that took Mohammed to a hospital in neighboring Bauchi state.
The Boko Haram terrorist network recently has been attacking soft targets such as children in schools the organization's name means "Western education is forbidden."
Friday's sustained attack against police targets would reflect their anger at the police killing in custody of their former leader, Mohammed Yusuf, who was shot in the back. Police said he was attempting to escape.
Police and Nigerian troops are accused of killing hundreds of detainees this year by the London-based human rights group Amnesty International.
The government declared a state of emergency on May 14. Since then security forces have succeeded in driving most militants out of major towns. But many extremists are believed hiding in rough terrain from which they venture to launch attacks, sometimes wearing army uniform and using vehicles stolen from the military.
---
Haruna Umar reported from Maiduguri, Nigeria. Associated Press writer Michelle Faul contributed to this report from Lagos, Nigeria.