Suspected Islamist gunmen killed 27 students and a teacher in a boarding school in the northeast Nigerian town of Potiskum on Saturday, a police source said.
The attack is a further sign that Islamist insurgent group Boko Haram remains a threat to Africa's top oil producer despite a crackdown on it.
The attackers set fire to buildings and shot pupils as they tried to flee, the source told Reuters by email. A hospital was treating several of the students for burns, he added.
It was the deadliest of three attacks on schools since the military launched an offensive in May to try to crush Boko Haram, whose nickname translates as "Western education is sinful" in the northern Hausa language.
Under the leadership of fiery militant Abubakar Shekau, Boko Haram rejects all Western cultural influences like modern schooling and yearns for the days when much of West Africa was ruled by great Islamic empires thriving off trans-Saharan trade.
Potiskum is in Yobe state, one of three covered by a state of emergency declared by President Goodluck Jonathan in May, when he ordered extra troops into the region to try to quell a rebellion seen as Nigeria's biggest security headache.
The police source responded by email as the mobile phone network was cut to much of the northeast as part of the state of emergency.
"We are really terrified ... Everyone fear these school attacks are going to continue and even spread to other towns," Bala Husseini, a resident of Potiskum who himself has two children not yet of school age, said in an emailed message.
In a separate attack hundreds of miles away in the town of Karim Lamido, Taraba state, suspected Islamist gunmen fired on a police station and a branch of First Bank, killing three policemen. A police official said the attackers blew up the bank's vault with dynamite and made off with the cash.
The hit-and-run strikes have raised fears the 7-week-old military offensive has pushed the insurgents fighting for a breakaway Islamic state into hiding, but failed to stop them launching devastating attacks.
Taraba, which has been only rarely attacked by the sect, is not covered by the military offensive, so the heist there may be a sign the assault has pushed the militants into other areas.
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.
Shifting targets of its attack as it comes under pressure has been a consistent Boko Haram tactic since the sect launched an uprising in 2009, when hundreds of members, including founder Mohammed Yusuf, were killed by security forces.
The militants have repeatedly proved masters at melting away under pressure and then re-crystallizing in new forms. From a radical clerical movement, they transformed into a rebellion, forging ties with al-Qaeda linked jihadist groups in the Sahara.
Nigerian forces say their offensive has enabled them to wrest back control of the remote northeast from Boko Haram, destroy key bases and arrest scores of suspects.
But critics say no amount of force can destroy what is in part a grassroots movement feeding off discontent at bad governance and widening inequalities between a depressed north and an economically booming south.
Jonathan's administration has offered an amnesty and peace talks to members who renounce violence, but their leader Shekau has repeatedly rejected any negotiations.