Boko Haram fighters briefly overran a town in northeast Nigeria in a raid to loot food supplies, military and civilian militia sources said on Sunday, in the latest attack in the restive region.
The attack happened on Saturday evening when a large number of jihadists stormed Magumeri, some 50 kilometres (30 miles) north of the Borno state capital, Maiduguri.
The town and surrounding area have been attacked before by fighters loyal to the Islamic State-group supported factional leader of Boko Haram, Abu Mus'ab al-Barnawi.
In July, at least 69 people -- most of them soldiers and civilian militia members -- were killed in an ambush on a heavily armed convoy escorting an oil exploration team.
"It was a huge invasion," a military source in Maiduguri told AFP of Saturday night's attack.
"They had heavy weapons and our troops were overwhelmed. After a fierce battle, they were forced to withdraw.
"Reinforcements were later deployed and they engaged the terrorists, pushing them out of the town, which is now under the full control of the Nigerian military.
"Civilians who had fled into the bushes have begun returning to their homes."
A member of the Civilian Joint Task Force (CJTF) added: "Boko Haram briefly took over Magumeri yesterday (Saturday) after pushing soldiers out of the town.
"Civilians fled as well. But later more soldiers were sent and they took over the town from Boko Haram."
Boko Haram was only in the town for several hours until early Sunday, he added.
"This is a classic Boko Haram attack: to loot supplies and assert their presence. Even if troops hadn't deployed they would have withdrawn after looting and destruction," the CJTF member said.
Boko Haram seized large parts of Borno and the neighbouring states of Adamawa and Yobe in 2014, as part of its quest to establish a hardline Islamic state in the remote northeast region.
Violence linked to the insurgency has left at least 20,000 dead and made more tan 2.6 million people homeless since 2009.
But a military counter-insurgency, begun in early 2015, has left Boko Haram largely reliant on smash-and-grab raids for food and supplies, and now lacks the resources or manpower to hold any substantial territory.
Instead, it has become more reliant on suicide bombers: this week, at least 50 people were killed in Adamawa, when a teenage boy set off his explosives at a mosque in the town of Mubi.
Both the military and militia source, who asked not to be identified for security reasons, said more details were expected as teams assessed the situation on the ground in Magumeri on Sunday.