The insurgents, who came with Hilux pick-up trucks, launched the attack in Bama, a commercial town about 187 km away from Maiduguri, yesterday, military spokesman Lt Col. Sagir Musa told reporters here.
In the incident, 22 policemen, 14 prison guards, two soldiers and four civilians were killed by the heavily-armed militants, Musa said.
However, 13 of the insurgents were also killed by soldiers as they attempted an attack on 202 Barracks in Bama, the official added.
The group wants to install an Islamic caliphate in Nigeria, an oil rich African country with a population of 150 million people equally shared between the two major religions, Islam and Christianity.