Borno state senator Ahmed Zanna told the BBC the attack on Bama had lasted for five hours on Wednesday morning.
On Tuesday, spokesman Doyin Okupe said the military was “on top of the situation”.
More than 245 people have been killed this year alone by suspected Islamists.
Several thousand have lost their lives since Boko Haram began its uprising in 2009.
Mr Okupe’s statement contradicted the comments of the governor of Borno state, where Boko Haram was founded.
Governor Kashim Shettima called for reinforcements and said the insurgents were “better armed and better motivated” than the security forces.
Details of what happened in Bama are still sketchy but residents have also contacted the BBC Hausa service to report the attack.
The town has been attacked several times in the past.
A state of emergency was declared in Borno and two neighbouring states last year, with thousands of extra troops sent to the region, but the attacks have continued.
The BBC’s Wills Ross in Nigeria says the army has at times taken hours to respond to attacks, allowing the militants to kill, destroy homes, schools and mosques, and loot before retreating.
On Saturday, 106 people were killed in an attack on the village of Izghe.
After meeting President Goodluck Jonathan, Mr Shettima said that without reinforcements “it is absolutely impossible for us to defeat Boko Haram”.
But this was denied by Mr Okupe, who said Nigeria’s army was one of the best equipped in Africa.
“We state authoritatively without any fear or equivocation whatsoever that Nigeria is already winning the war against terror and the activities of the insurgents will be terminated within the shortest possible time.”