Witnesses in northeast Nigeria say more than 30 people were killed Tuesday when suspected Islamist militants attacked a school.

The attack occurred about 2 a.m. local time, at Federal Government College Buni Yadi, a state-run, co-educational school in Nigeria's Yobe state.

Students and their parents tell VOA that the attackers set fire to dormitories and then killed students with machetes and knives, or threw them back into the burning buildings, as they tried to escape.

The witnesses say militants killed only male students. They say no soldiers or firefighters arrived until after the attack was over.

There has been no claim of responsibility, but officials blamed the attack on the militant group Boko Haram.

Yobe is one of three states where President Goodluck Jonathan declared a state of emergency last May and launched operations to destroy Boko Haram camps. Despite the effort, large-scale attacks have continued.

The governor of neighboring Borno state said last week that militants were better armed and better motivated than government forces. The military rejected his comments, and said it is gaining ground.

Mr. Jonathan also defended the military's work at a press conference Monday.

"The issue of the communities being worried, even if I were them, I'll feel the same way. You don't blame them. I promise that we will continue to improve. Communities naturally will feel that government is not giving them the protection they deserve. I don't blame them, but we're improving on it."

Boko Haram is blamed for thousands of deaths since 2009, including attacks on mosques, churches, villages, markets and government facilities.