Clashes in Nigeria's restive northeast have killed five Boko Haram Islamists and 13 fighters from a vigilante group.
Members of the civilian militia heard that Islamists were planning to attack the town of Benishiek in Borno state, Boko Haram's historic stronghold, said Garba Ngamdu, an aide to the state governor.
The Islamists arrived in the early hours of Sunday morning and a gunfight broke out, Ngamdu added, in an account corroborated by several vigilante fighters.
"The youths (vigilantes) in Benishiek lost 13 of their members. Twelve died when they were ambushed around 12:30 am (2330 GMT Saturday) and another one died in the hospital," he said.
He added that five Boko Haram fighters were killed in the fighting.
The governor's aide and wounded vigilantes described the clashes to journalists in the Borno state capital Maiduguri, some 70 kilometres from Benishiek.
Area military spokesman Sagir Musa confirmed the violence in Benishiek and said "troops are still combing the area in search of the fleeing terrorists".
Speaking at a Maiduguri hospital, injured militia member Mohamed Abuwar said the vigilantes succeeded in preventing Boko Haram from carrying out a much more deadly attack.
"We successfully repelled the terrorists' attack because they wanted to kill all of us and our parents," he told journalists.
The military has applauded the emergence in recent months of civilian fighters, describing them as a helpful tool which has boosted the military effort against Boko Haram.