Boko Haram gunmen opened fire in a college dormitory in northeast Nigeria as the students slept, killing 40, in the latest massacre blamed on the Islamist insurgents.
All of the dead were students of the College of Agriculture in the town of Gujba in Yobe state, the area governor said in a statement.
The early morning attack was carried out by "Boko Haram terrorists who went into the school and opened fire on students" while they were sleeping, the military spokesman in Yobe, Lazarus Eli, told AFP.
The victims' corpses were brought to a hospital in the state capital of Damaturu, some 30 kilometres away, where hundreds of relatives of those who attended the college had "thronged" to see whether their families members were among the dead, said a hospital official who requested anonymity.
The office of Yobe Governor Ibrahim Gaidam put the death toll at 40, with four others injured, confirming an earlier toll given to AFP by the Damaturu Specialist Hospital official.
The European Union's foreign policy chief Catherine Ashton called the slaughter "horrific."
Yobe has seen a spate of attacks on schools and universities, all blamed on Boko Haram, an extremist group that has killed hundreds in its four-year insurgency.
The name Boko Haram, loosely translated, means "Western education is forbidden", and the group has become notorious for slaughtering students of various ages in recent years.
In July in the town of Mamudo in Yobe, Islamists threw explosives and sprayed gunfire into dormitories in the middle of the night, killing 41 students.
Suspected Boko Haram gunmen shot dead seven secondary school students and two teachers in Damaturu in June.
-Military offensive criticised-
The military has described the recent school attacks as a sign of desperation by the Islamists, claiming that they lack the capacity to strike anything but soft targets.
The defence ministry has said that an offensive launched against Boko Haram in mid-May has decimated the group and scattered their fighters across remote parts of the northeast, the insurgents' traditional stronghold.
While many of the recent attacks have occurred in more remote areas, often targeting defenceless civilians, the unchecked killing has cast doubt on the success of the military's campaign.
"Although there is increase in troop movement and... more military hardware in the northeast, people were yet to see the kind of action on the ground that effectively nips criminal and terrorist activities in the bud," the Yobe governor's statement said.
Scores have been killed this month, including in the northeastern town of Benisheik in Borno state, where at least 142 people were slaughtered by presumed Boko Haram fighters who came disguised as soldiers, set up checkpoints and fired on motorists and bystanders.
Some of the recent violence has targeted vigilante groups which have formed to help the military.
The northeast remains under a state of emergency imposed on May 14.
The phone network has been switched off in much of the northeast since the emergency measures were declared, a move the military said would help prevent the Islamists from coordinating attacks.
Some have suggested that the lack of phone service has prevented civilians from sounding the alarm during attacks.
Boko Haram has said it is fighting to create an Islamic state in Nigeria's mainly Muslim north, but the group is believed to be made up of different factions with varying aims.
The group has attacked churches, mosques, newspaper offices, the security forces, politicians and a UN building, among other targets.
According to an estimate made earlier this year, the conflict has cost more than 3,600 lives, including killings by the security forces. The current figure is likely much higher.
Nigeria is Africa's most populous country and top oil producer, roughly divided between the mainly Muslim north and a predominately Christian south.