At least 26 students were killed when gunmen opened fire in a college residence in the north-eastern Adamawa state.
Islamist insurgents have been active across northern Nigeria, but police are also investigating whether the killings at the Federal Polytechnic Mubi might have been part of a political feud among students.
The Boko Haram Islamist sect, which usually targets politicians or security forces, has also attacked students in the past and has cells in Adamawa.
Yushua Shuaib, a spokesman for the National Emergency Management Agency, said it was not clear if the attack was carried out by Boko Haram or if it was related to a dispute between rival political groups at the college.
He said police were investigating the possibility that the shootings were prompted by a dispute between rival gangs over a student union election on Sunday.
"They think the ones who were disgruntled might have been the ones who were doing the attack," he said.
A security source confirmed that this possibility was being investigated, adding that security forces had raided the residence over the weekend, and arrested some students and seized weapons.