Suspected members of the Nigerian Islamist group Boko Haram have launched a coordinated attack in the north-eastern part of the country, leaving at least 55 people dead according to the Nigerian army.

The early morning raid, which took place in the town of Bama over five hours, was intended to set free more than 100 prisoners.

Army officials confirmed that the dead include 22 police personnel, 14 prison officials, two soldiers, four civilians, and 13 Islamist militants. The army's admission that two of its troops have been killed is considered surprising since it usually plays down its own casualty figures.

Army barracks and government buildings in the town were also torched during the raid.

At least 200 heavily-armed suspected Boko Haram militants were involved in the raid, suggest reports from the scene. Some sources suggest as many as 300 militants took part in the attack.

"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. One woman who could not run burned to death," eyewitness Amina Usman told Reuters.

Bama is a small town about 70km from Maiduguri, the provincial capital of Borno which often bears the brunt of Boko Haram's attacks. The group has not officially claimed responsibility for the attack.

This is one of the deadliest strikes by the Islamists since 2009 although frequent gun fighting involving them has been reported.

Some of the attackers were dressed in military uniforms, according to officials.

"Some of the gunmen attacked the military barracks but they were repelled. Ten of them were killed and two were arrested. But the gunmen broke into the prison, freeing 105 inmates, and killed all prison warders they could see except those who hid in a store where cooking utensils were kept," army spokesperson Sagir Musa told AFP.

A large cache of arms and ammunition has also been recovered from the scene.

According to the Nigerian Premium Times, rocket-propelled grenades were also used by the militants.

Human Rights Watch says more than 3,000 people have been killed in Boko Haram attacks since 2009.