Authorities in northeastern Nigeria say suspected Islamist militants have killed at least 29 people in an attack on a school.

The attack occurred about 2 a.m. Tuesday at Government College Buni Yadi, in Nigeria's Yobe state.

Initial reports say the militants set fire to a dormitory, burning some students alive.

Officials blamed the shooting 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.