A suicide bomber disguised in school uniform has detonated explosives at a high school assembly, killing at least 48 students.
Soldiers rushed to the scene in the city of Potiskumbut, the capital of Yobe state, but were chased away by a crowd throwing stones and shouting.
They were angry about the military's inability to halt a five-year Islamic insurgency that has killed thousands of people and driven hundreds of thousands from their homes.
A suicide bomb attack in the same city killed 30 people a week ago, when suspected Boko Haram fighters attacked a religious procession of moderate Muslims. Some 2,000 students had gathered for the weekly morning assembly at the Government Technical Science College when the explosion blasted through the school hall.
Student Musa Ibrahim Yahaya (17) said: "We were waiting for the principal to address us, around 7.30am, when we heard a deafening sound and I was blown off my feet, people started screaming and running, I saw blood all over my body."
She is hospital being treated for head wounds.
Hospital records show 79 students were admitted and health workers said they include serious injuries that may require amputations. The hospital was so overcrowded that some patients were squashed two to a bed.
A mortuary attendant said 48 bodies were brought to the hospital and all appeared to be between the ages of 11 and 20 years old.
Survivors said the bomber appeared to have hidden the explosives in a type of rucksack popular with students.
Months ago, Nigeria's military reported finding a bomb factory where explosives were being sewn into rucksacks in the northern city of Kano.
Garba Alhaji, father of one of the wounded students, said there was no proper security at the school. "I strongly blame the Yobe state government for not fencing the college," he said. He added that just three months ago a bomb was discovered in the school and removed by specialists.
Many Nigerians are angry that Boko Haram has increased attacks and bombings since the government claimed to have brokered a cease-fire on October 17.