Nigerian troops target Boko Haram in Damaturu
Army spokesman Lt Eli Lazarus said the battle in Damaturu lasted several hours and 10 arrests were also made.
He said the militants killed included a senior commander known as one-eyed Bakaka.
Boko Haram is fighting to overthrow the government and impose Sharia law across Nigeria.
Attacks in central and northern Nigeria attributed to the group have killed an estimated 1,400 people since 2010.
In a statement, Lt Lazarus described “the notorious one-eyed Bakaka” as Boko Haram’s field commander in Damaturu and a close associate of the sect’s leader Abubakar Shekau.
However, the BBC’s Will Ross in Nigeria says it is not possible to verify the information.
Earlier, police reports said four suspected militants had been killed rather than 30.
However, human rights groups say army operations in northern Nigeria have also left many civilians dead and they complain that arrests are often indiscriminate.
In September the military said it had killed 35 suspected Boko Haram members in fierce gun battles in Damaturu. Scores of people were also arrested there in a door-to-door sweep of several neighbourhoods.”