At least 20 people, mostly students, have been killed by unknown gunmen in Mubi, north-eastern Nigeria, a police source has told the BBC.
The attack happened at a student hostel away from the Federal Polytechnic Mubi campus, the source said.
A lecturer told the BBC that more than 40 students had been killed but there has been no official comment.
The reported killing comes days after a major operation against the Boko Haram militant group in the town.
The lecturer, who did not want his name to be used, told the BBC’s Hausa service that men in military uniform asked the students to line up and then say their names.
Some were then shot dead and others stabbed with knives, and their bodies left in lines outside the buildings.
The lecturer says it is not clear why some were killed and others spared – some of those killed were Muslims and other Christian.
“Everybody is scared,” he said.
He added that students were now leaving the town, many with tree branches over their cars – a traditional sign of neutrality in Nigeria.
Other Mubi residents say they heard gunfire for about two hours during the night and that those living near the hostel were also targeted.
The authorities have imposed an indefinite curfew in the town and ordered residents to stay indoors.