At least 20 people, mostly students, have been killed by unknown gunmen in Mubi, north-eastern Nigeria, officials say.
Most of the dead are said to have attended the Federal Polytechnic Mubi.
A college spokesman said 26 students had been killed, while a local resident told the BBC that more than 40 people had been shot dead or stabbed.
The killings come days after a major operation against the Boko Haram militant group in the town.
National Emergency Management Agency spokesman Yushua Shuaib told the Reuters news agency that it was not clear whether the attack was the work of Boko Haram, or the result of a dispute between rival political groups at the university.
A Red Cross official said at least 10 people had died, reports the AFP news agency.
BBC Nigeria correspondent Will Ross says mobile phone masts in the area were recently attacked by the militants, so getting information from Mubi is difficult.
'Everybody is scared'
A resident, who did not want his name to be used, told the BBC's Hausa service that men in military uniform went to a hall of residence away from the campus just before midnight, got the students out of their rooms and ordered them to say their names.
Some were then shot dead and others stabbed with knives, and their bodies left in lines outside the buildings.
He said it is not clear why some were killed and others spared - some of the dead were Muslims and others 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.
The university has been temporarily closed.
Last week, the Nigerian military carried out an operation in Mubi and arrested dozens of people over suspected links to Boko Haram.
Mubi is in Adamawa state, which has a mixed Muslim and Christian population and borders Borno state, where Boko Haram came to prominence in 2009, staging an uprising in the state capital, Maiduguri.
Boko Haram has not yet commented on the Mubi attacks.
It is fighting to establish Islamic law in Nigeria and has killed more than 1,000 people in numerous attacks across northern and central areas this year.
D. Ultimate Naija Ruler