Suspected fighters from the Nigerian group Boko Haram have staged an attack on the northeastern town of Bama, freeing over 100 prison inmates and leaving 55 people dead, the military said.
Around 200 heavily armed members of Boko Haram arrived in buses and pick-up trucks and carried out the coordinated strike on Tuesday, first hitting the army barracks and the police station before breaking into the town's prison, military spokesman Sagir Musa told the Reuters news agency.
Musa said 22 police officers, 14 prison officials, two soldiers and four civilians were killed, while 13 of the group's own members died, in what was one of the rebel's most deadly single strikes since a 2009 uprising.
Gunmen freed 105 prisoners during the raid which began at around 5am (0400 GMT) and lasted almost five hours, Musa said. He said some of the attackers were dressed in army uniforms.
Bama's police station, army barracks and government buildings were set ablaze, he said.
"They came in army uniform pretending to be soldiers but were able to detect them," Musa said.
Bama is a small, remote town in northeastern Borno state, Boko Haram's home state and the nucleus of its attacks.
"The call to prayer was just being said at about 5am when the Boko Haram started shooting from all directions and we ran for our lives," eyewitness Amina Usman told Reuters.
"One woman who could not run burned to death," Usman added.
Boko Haram and offshoots such as the al-Qaeda-linked Ansaru, as well as associated criminal networks, pose the main threat to stability in Africa's top energy producer.
Western governments are increasingly concerned about Nigerian fighters linking up with other jihadist groups in the West African region.
Boko Haram wants to carve out an Islamic state in a country split roughly equally between Christians and Muslims. One of its chief demands is that its imprisoned members and family members are released and it has carried out several prison breaks.
Attacks by Boko Haram have killed more than 3,000 people since 2009, based on figures from Human Rights Watch.