Boko Haram insurgency against African nations
Chad and Niger forces descend on Boko Haram after militant group pledges allegiance to Isis Reuters file photo

Hundreds of people have fled their homes in northern Nigeria after terror group Boko Haram set buildings ablaze.

The incident occurred in the rebel-controlled town of Bama, in Borno State, as Nigerian troops are advancing to regain control of the area.

Who are Boko Haram?

Boko Haram fights against Western influence in Nigeria and aims to impose its version of Sharia law in the country. The group declared an Islamic caliphate in Gwoza, along the Cameroon border, in August 2014.

Boko Haram has raiding several cities in the north of the country in a bid to take control of more land.

Three states, Adamawa, Borno and Yobe, have been under a state of emergency since May 2013, due to Boko Haram's deadly attacks.

Witnesses told AFP that the insurgents warned residents to leave before torching the town. Dozens fled towards Maiduguri, capital of Borno state.

"They came into the town around 12pm warning that anyone who wanted to leave should leave the town and soon after they began torching homes," resident Umar Kaka said. "Not all residents could leave because some are too sick or old to leave and we are afraid they were burnt in the homes."

The attack in Bama was carried out after troops managed to push the insurgents out of the nearby Boboshe and Yale villages.

"We learnt soldiers were coming. They advanced on Bama on two fronts and met some resistance at Boboshe and Yale but succeeded in crushing the Boko Haram gunmen," said Bama resident Ibrahim Kyari.

"They asked residents to leave which came to us as a surprise because they kept us captives all these seven months and would not allow us to leave."

The Nigerian army is aided by African Union soldiers – comprising troops from Niger, Chad, Benin and Cameroon – in the fight against the insurgents, who have killed thousands of people in north-eastern Nigeria in recent years.

The deployment followed President Goodluck Jonathan's decision to postpone presidential elections by six weeks on grounds of security.

In February, Nigeria announced the fight against the insurgents, who recently pledged allegiance to terror group Islamic State (Isis), is almost over. However, critics have cast doubts on previous claims by the Nigerian government and army that they had reached a truce with the terrorists.