More than a dozen people have been killed after getting caught in a clash between suspected Boko Haram militants and soldiers in northern Nigeria.
Eighteen militants launched an attack using suicide bombers, mortars and gunmen on Sunday, a military officer told news agency AFP.
They targeted two villages and a military base near the city of Maiduguri, in Borno State.
The emergency services said a number of villagers were killed trying to escape.
It is the largest attack since the government revealed it was in talks with the Islamist militants.
The officer, who spoke on condition of anonymity, said the attackers, including seven suicide bombers, arrived on foot.
Ba'Kura Abba Ali, a local militia leader supporting Nigerian troops, told AFP they were trying to enter Maiduguri - the city at the epicentre of the insurgency.
"So far we have recovered 18 dead bodies from the two villages Bale Shuwa and Bale Kura," Bello Dambatto, of the State Emergency Management Agency, told AFP.
"The victims were killed while trying to escape the fight between the insurgents and the military."
It is unclear if all 18 were villagers, or if some were extremists or soldiers.
The attack also left at least 68 people wounded, according to news agency Reuters.
It began at about 20:50 local time (19:50 GMT) and lasted for an hour, AFP said.
Blasts could be heard by people in the city.
Boko Haram has killed some 20,000 people and displaced more than two million since it began a campaign of violence to create an Islamic state in the north of the country in 2009.
The government confirmed last month it was in talks with Boko Haram militants.
However, it is unclear whether it was speaking to all factions of the group, which splintered two years ago.
The faction led by Abubakar Shekau is known for its use of suicide bombers.
A second faction, led by Abu Musab al-Barnawi, was behind the abduction of the Dapchi schoolgirls.