The attack late on Wednesday happened in Magumeri, some 50 kilometres (30 miles) northwest of the Borno state capital, Maiduguri.

It came after a lull in raids on major towns in the remote region following sweeping military offensives which Nigeria has claimed has severely weakened the jihadists to the point of defeat.

Scores of Boko Haram fighters arrived in Magumeri at about 6:30 pm (1730 GMT) in vans, motorcycles and on foot, firing heavy weapons and rocket-propelled grenades, forcing residents to flee.

“They (Boko Haram) broke into shops and homes and took away every food item they came across,” said local resident Kulo Sheriff, who fled the town then returned on Thursday morning.

“They set fire to homes and shops as they looted them before heading into the bush hours later.”

Before looting, the fighters attacked a military base and a police station where there was a shoot-out, according to a civilian militia member assisting troops with security.

Militants overpowered the security personnel who withdrew, allowing them to loot and burn down the base and the police station, he added.

‘Famine-like conditions’ – Nigeria’s military, however, claimed to have repelled the attack and “neutralised quite a number of the attackers”, recovering three vehicles and a “large quantity of arms and ammunition”.

Independent verification was not possible given access restrictions for reporters to travel outside Maiduguri without military permission.

Either way, the raid indicated that Boko Haram still has the capacity to attack major towns, despite claims it is in disarray since troops flushed them out of their Sambisa Forest stronghold.

The number of raids has decreased since the camps were routed last December, although there have been sustained attempts at suicide bombings in Maiduguri.

A civilian militia member in the city maintained Boko Haram have been weakened and their attacks were designed to re-stock dwindling food supplies, as supply lines have been cut off.

“Boko Haram are starving in the bush, they live on very little food,” said Babakura Kolo.

“They are pushed more by hunger to carry out raids than desire to fight.”

Last month Boko Haram fighters went door-to-door seizing food aid distributed days earlier in Gajiram, some 100 kilometres by road from Magumeri, after a battle with police and soldiers. Boko Haram’s insurgency has triggered a major humanitarian crisis in northeastern Nigeria, where 7.1 million people are “severely food insecure”, according to the UN.

Aid agencies say parts of Borno state are suffering from “famine-like conditions”. Poor governance and climate change have also been powerful contributors to the crisis in the region.