Boko Haram fighters have killed at least 18 people at a funeral in northeast Nigeria, residents and a police official have said.

The attackers shot at mourners and set houses on fire after arriving on motorbikes in the village of Kuda near Madagali town in Adamawa state on Thursday evening, witnesses said.

At least 10 people were injured in the incident, one witness told the Associated Press news agency on condition of anonymity due to security concerns.

Resident Moses Kwagh told the Reuters news agency that people waited until three hours after the attack and then counted 18 women's bodies. Some women were still missing, he said.

"When we said that Boko Haram is still in this place, some people sit in Abuja and claim that there is no more Boko Haram - but see what has happened," Kwagh said.

READ MORE: Can Boko Haram be defeated?

Othman Abubakar, a police spokesman, said on Friday that the number of dead could rise.

State lawmaker Emmanuel Tsamdu told Reuters: "I have yet to get the details on how it happened and the real number of people killed. I have sent hunters to the area to get me the details because people are afraid to go to the village."

Kuda is close to the Sambisa Forest, a vast colonial-era game reserve where Boko Haram fighters hide in secluded camps to avoid the Nigerian military. The village was previously attacked by Boko Haram in February.

READ MORE: Muhammadu Buhari - 'I haven't failed' against Boko Haram

Under President Muhammadu Buhari's command and aided by Nigeria's neighbours, the army has recaptured most of the territory seized by Boko Haram, but the armed group still regularly stages attacks.

Recent attacks in southeastern Niger bordering Nigeria killed more than 20 soldiers and displaced tens of thousands, worsening an already dire humanitarian situation in the region.

Boko Haram pledged support for the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) last year. The Nigeria-based group's nearly seven-year-old violence has killed about 20,000 people, forced more than two million from their homes and spread into neighbouring countries.