Up to seven people died when Nigeria's army repelled an attack on Sunday by suspected Boko Haram fighters on a village near a northern state capital, residents and military sources said.
Gunfire and explosions could be heard in the evening outside Maiduguri, the capital of Borno state and birthplace of Boko Haram's insurgency to establish an Islamic state in the northeast of Africa's most populous nation.
Soldiers stopped suspected Boko Haram fighters in Aldawari village on the outskirts of Maiduguri, military sources and witnesses said.
"We just came out of the mosque after evening prayers, then we started hearing gunshots, then suddenly there was the sound of a blast," said Nene Hassan, a resident, adding that four people died and five were wounded.
Since losing most of the territory it seized earlier this year to the army, Boko Haram has resorted to hitting soft targets such as markets, bus stations and places of worship, as well as hit-and-run attacks on villages, mainly in Borno state.
Another witness of Sunday's attack, Mustapha Ahmadu, said at least seven people had been killed. "More body parts are just lying everywhere," he said.
The village was set on fire during the shootout between the army and the gunmen, said Alhaji Jiddari, another resident.
"After the prayers we saw people running away from Aldawari village into ours, and there was the sound of gunshots from that direction," said Jiddari. "Soldiers drove towards the direction of the shooting."
The insurgency in Nigeria has killed thousands and displaced more than two million people in the remote northeast.