A local official in northeastern Nigeria says suspected Boko Haram extremists have killed more than 60 people during an attack on villagers who were leaving a funeral.

It is the deadliest extremist attack on civilians in the region so far this year.

Muhammad Bulama, council chairman of the Nganzai local government area, told reporters that 11 other people were wounded during the midday attack on Saturday.

Bulama called it a reprisal after villagers fought off a Boko Haram attack in the area two weeks ago.

Nigerians last week marked the grim 10-year anniversary of the Boko Haram insurgency, which has killed tens of thousands of people, displaced millions and created one of the world's largest humanitarian crises.

The militants, who seek to impose a strict Islamic state in the region, have defied the claims of President Muhammadu Buhari's administration over the years that the insurgency has been crushed. The violence also has spilled into neighbouring Chad, Niger and Cameroon.

Nigeria's military did not immediately comment on Saturday's attack.

Bunu Bukar, secretary of the Borno Hunters Association, a self-defence group, said the militants roared up on motorbikes Saturday and opened fire on villagers returning from offering funeral prayers for a relative. He said his colleagues had recovered nearly two dozen bodies.

Bana Musa, who also serves on the local council, told The Associated Press that some people managed to escape the gunfire.