Residents say hundreds of Islamic extremists attacked a northeast Nigerian town for hours, killing 39 people and razing a mosque and more than 1,000 homes.

Wailing farmers described Tuesday night's attack to visiting Borno state Gov. Kashim Shettima. They said soldiers and police stationed in the town fled and asked why it took hours for the military to scramble an aircraft that strafed the attackers into flight.

An Associated Press reporter counted 39 bodies ready for burial Wednesday in the town of Konduga, some 35 kilometers (22 miles) and 30 minutes' drive from the Borno state capital of Maiduguri. At least three children were among the dead.

Numerous villages in the area have been attacked and hundreds have been killed in recent months despite a military state of emergency.