Militants in north-eastern Nigeria killed at least nine people in a Sunday attack, sources told Reuters.
It is the latest in a series of attacks in north-east coinciding with the Nigerian military implementation of a new strategy of withdrawing to “super camps” the military maintains can be better defended against Islamist insurgents.
Some security experts are concerned areas vacated under the strategy announced by President Muhammadu Buhari in July are being filled by insurgents, leaving civilians vulnerable in a region grappling with a decade-long insurgency that has killed more than 30,000 people.
A military source and a resident of Gubio in Borno state said the attack lasted more than four hours.
Islamic State claimed responsibility for the attack via its Amaq news agency, saying it killed and wounded 18 Nigerian soldiers and took vehicles and weapons before fleeing.
The group said the attack on Nigerian army barracks in Gubio where militants clashed with soldiers before the insurgents withdrew.
Military spokesmen did not immediately respond to phone calls and text messages seeking comment.
The resident said armed men moved freely for more than three hours after overpowering soldiers and left without being challenged.
Residents and security experts said Islamic State is exploiting the new Nigerian military strategy to recruit people. Reuters earlier reported militants claiming affiliation to Islamic State passed through Gubio in August with a fighter leading evening prayers. Many Gubio residents chose to stay rather than flee to a government controlled city.
The Boko Haram insurgency, aimed at creating a state in north-eastern Nigeria that adheres to a strict interpretation of Islamic law, began in 2009. A splinter faction claiming allegiance to Islamic State broke away in 2016.