Nigerian President Goodluck Jonathan has condemned the midnight massacre of at least 78 students, apparently perpetrated by Boko Haram Islamists, as chilling details of the carnage emerge.

Jonathan said the extremist attacks were the "creation of the devil" and pledged to take strong action against the rebels fighting in the restive northern region.

"I held a meeting with service chiefs on the killings of students in Yobe State before coming for this media chat. We discussed and resolved that we must do more. I have asked the service chiefs to meet again now and see what we can do to stop these embarrassing attacks," he said during a press conference.

Although the confirmed death toll was around 40, local reports suggested as many as 78 students were slaughtered, and scores are still missing.

Most of the students, who were sleeping in their dormitory when the attack took place, were aged between 18 and 22.

The gunmen began their ambush on the students of the College of Agriculture, Gujba, at about midnight and the assault continued until the early hours of 29 September.

Initially, the students were killed with swords and knives. However, once the students began to flee, the militants opened fire. Some of the retrieved bodies had been decapitated.

Afer killing the students, the gunmen attacked nearby residents as well. Reports suggest Nigerian security forces did not arrive at the scene until at least two hours after the assailants left.

"They started gathering students into groups outside, then they opened fire and killed one group and then moved onto the next group and killed them. It was so terrible," Idris, a surviving student, told Reuters.

Ahmed Gujunba, another resident in the locality said, "They came with guns around 1am [12pm GMT] and went directly to the male hostel and opened fire on them ... The college is in the bush so the other students were running around helplessly as guns went off and some of them were shot down."

Although no group has claimed responsibility for the killing, police reports point fingers at the Islamic movement Boko Haram, which is fighting to create an Islamist state in northern Nigeria, and has intensified attacks on civilians in recent weeks.