Jihadists killed four police officers and two civilian militiamen in an attack on a military base in northeast Nigeria's Borno state on Wednesday, security sources told AFP.

Suspected Boko Haram fighters in trucks fitted with machine guns launched a dawn raid on the army base in the town of Damboa, sparking intense fighting.

"We lost four mobile policemen and two civilian militia fighting alongside soldiers during the fight with the terrorists," said a military officer, who spoke on condition of anonymity.

Anti-jihadist militia leader Ibrahim Liman confirmed the toll, after supporting soldiers during the attack.

Nigeria's decade-long jihadist insurgency has killed 36,000 people and displaced two million others inside the country, and spilled into neighbouring Niger, Chad and Cameroon.

Local resident Modu Malari said on Wednesday the insurgents had attacked with machine guns and rocket-propelled grenades but were forced out from the town by troops after a fierce two-hour battle.

More than 50 residents were injured by shrapnels from grenades fired by the jihadists, he said, after some strayed into nearby homes.

Damboa lies on the fringe of Boko Haram's Sambisa Forest stronghold from where the group has launched repeated attacks on villages and military posts.

In November last year, at least 10 Nigerian soldiers were killed and nine injured in a Boko Haram ambush in Muchima village, outside Damboa.