"It's not safe," he said. "The gunmen are attacking schools and there is no protection for students despite all the soldiers," he added.

A poster offers a reward for the capture of Boko Haram head Abubakar Shekau

It is the deadliest of three attacks on schools since the military launched its offensive to try to crush Boko Haram. The group's nickname translates as "Western education is sinful" in the northern Hausa language.

Suspected Islamist militants opened fire on a school in Nigeria's northeastern city of Maiduguri last month, killing nine students, and a similar attack on a school in the city of Damaturu killed seven just days earlier.

Dozens of schools have been torched and unknown scores of students killed among more than 1,600 victims slain by extremists since 2010.

Militants have increasingly targeted civilians, including health workers on vaccination campaigns, teachers and government workers, while farmers have been driven from their land.

President Goodluck Jonathan declared a state of emergency on May 14, and deployed thousands of troops to halt the insurgency, acknowledging that militants had taken control of some towns and villages.

Nigerian forces say they have wrest back control of the remote northeast from Boko Haram, destroying key bases and arresting scores of suspects.

However, the military crackdown has pushed many militants into hiding.