MAIDUGURI, Nigeria (Reuters) - At least 19 people were killed in an Islamist militant attack on a village in northeast Nigeria in the early hours of Sunday, a survivor of the attack said.

The strike is the latest blow to Nigeria’s efforts to defeat insurgencies by the Nigerian Islamist Boko Haram group and Islamic State in West Africa (ISWA). In recent months, the military has suffered its heaviest defeats in years, commanders have been repeatedly replaced, and special forces soldiers have mutinied.

The militants attacked the village of Mailari in the Guzamala region of Borno state at around 2 a.m., according to the survivor, Abatcha Umar. He said he had not been able to tell whether they belonged to Boko Haram or to ISWA.

Umar said he had counted 19 people killed, including his younger brother. An aid worker at a camp that received the survivors, and who declined to be identified, put the death toll at 63.

The Islamist militants had been spotted around the village three days before their attack, said Umar. Locals had warned Nigerian troops stationed in the nearby town of Gudumbali, but no action was taken, he said.

The aid worker said hundreds of people from villages in the area had fled to the camp for displaced people where he worked, in Monguno.

(Removes extraneous word ‘insurgencies’ in second paragraph)