Boko Haram fighters killed 11 troops and seized weapons in a raid on a military post in the latest such attack in northeast Nigeria, residents and a military source said on Sunday.
Gunmen in five trucks and on motorcycles stormed the checkpoint in Bunari village near the garrison town of Monguno in Borno state late Friday, leading to a fierce battle.
"They came around 6:30 pm (1930 GMT) and attacked the military checkpoint and soldiers responded with fire," resident Amadu Sheriff told AFP.
"The attackers overpowered the soldiers who took up positions in the trenches dug round the checkpoint from where they fought the Boko Haram gunmen," he said.
Three civilians, including a woman and her child, from a nearby settlement, were killed by stray bullets, he said.
He said residents of the nearby settlement evacuated on Saturday and moved to Monguno for fear of renewed attacks.
Sheriff had no idea of military casualties but saw "two ambulances carrying dead soldiers" being taken to Monguno, eight kilometres (five miles) away.
A military source who confirmed the attack said 11 troops were killed.
"Four (military) vehicles including an APC (armoured personnel carrier) and a gun truck were carted away by the terrorists," said the military source who asked not to be identified because he was not authorised to speak on the incident.
The attackers were repelled with the help of reinforcements from Monguno, he added.
News of the attack was slow to emerge due to poor communication in the area where Boko Haram has destroyed telecoms infrastructure in the last three years.
Boko Haram has launched repeated attacks recently.
The Islamists late Thursday stormed a base on the outskirts of Jakana, a village 30 kilometres (18 miles) from Maiduguri, firing guns and rocket-propelled grenades before sacking and burning down a police station.
Two weeks ago, the jihadists overran a military base in nearby Yobe state.
On July 14, jihadists believed to be loyal to Boko Haram factional leader Abu Mus'ab Al-Barnawi, raided a base in Jilli village.
Dozens of troops were said to have been killed or missing.
The day before the attack, 23 troops went missing after a military convoy was ambushed by fighters in the Bama area of Borno state, where the Abubakar Shekau faction of Boko Haram is strong.
The attacks underline the threat Boko Haram still poses despite repeated military claims the group is spent force.