Suspected Islamic extremists have attacked an agricultural college in the dead of night, gunning down dozens of students as they slept in dormitories and torching classrooms.
It was the latest violence in north-eastern Nigeria's continuing Islamic uprising.
The attack, blamed on the Boko Haram extremist group, came despite a four and a half month-old state of emergency covering three states and one-sixth of the country.
Provost Molima Idi Mato of Yobe State College of Agriculture said there were no security forces protecting the college. Two weeks ago, the state commissioner for education had begged schools and colleges to reopen and promised they would be guarded by soldiers and police.
Idi Mato said as many as 50 students may have been killed in the assault that began at about 1 am on Sunday in rural Gujba. "They attacked our students while they were sleeping in their hostels. They opened fire at them," he said, adding that most victims were aged between 18 and 22.
Soldiers recovered 42 bodies and transported 18 wounded students to Damaturu Specialist Hospital.
Two of the wounded later died, said Adamu Usman, a survivor from Gujba who was helping at the hospital.
President Goodluck Jonathan condemned the attack in a televised "chat with the media" and questioned the motives of Boko Haram, which wants to impose Islamic law across Nigeria. He said he wondered whether the victims were Muslim or Christian.
Mr Usman said almost all those killed were Muslims, as is the majority of the college's student body.
Mr Jonathan likened the assault to that on Nairobi's premier shopping mall last week, where Islamic extremists from Somalia's al-Shabab movement killed 67 civilians - but only after allowing many Muslims to leave. Boko Haram has said some of its fighters trained with al-Shabab in Somalia.
Boko Haram leader Abubakar Shekau has said in video addresses that his group wants to end democracy in Nigeria and allow education only in Islamic schools. Boko Haram means "Western education is forbidden."
Its uprising poses the biggest security challenge in years to Nigeria which is Africa's biggest oil producer and its most populous nation with more than 160 million people - almost equal numbers of which are Muslims and Christians.
Boko Haram militants have killed more than 1,700 people since 2010.
"Sometimes you need courage" to confront such challenges, Mr Jonathan said, accusing the extremists of choosing soft targets to embarrass his government.
Governor Ibrahim Gaidam of Yobe state, where the killings occurred, indicated that the military crackdown is ineffective.
"Although there is (an) increase in troop movement and military hardware deployment in the northeast, people are yet to see the kind of action on the ground that effectively nips criminal and terrorist activities in the bud," he said in a statement.
The extremists rode into the college in two double-cabin pickup all-terrain vehicles and on motorcycles, some dressed in Nigerian military uniforms, a surviving student, Ibrahim Mohammed, said. He said they appeared to know the layout of the college, attacking the four male hostels but avoiding the one hostel reserved for women.
"We ran into the bush, nobody is left in the school now," Mohammed said.
Wailing relatives gathered outside the hospital morgue, where workers laid out bloody bodies in an orderly row on the lawn for family members to identify loved ones.
Provost Idi Mato confirmed the school's other 1,000 enrolled students have fled the college.
Most schools in the area closed after militants on July 6 killed 29 pupils and a teacher, burning some alive in their hostels, at Mamudo outside Damaturu.
The Islamic extremists have killed at least 30 other civilians in the past week, including a pastor and his son. And the military said it killed more than 100 militants and lost 16 soldiers in an attack on an extremist stronghold days earlier.
The attacks come as Nigeria prepares to celebrate 53 years of independence from Britain on Tuesday and amid political jockeying in the run up to presidential elections next year.