MAIDUGURI, Nigeria — Assailants shot or stabbed to death at least 25 people in the second attack near colleges in Nigeria's troubled northeast in the last few days, officials said Tuesday.

Authorities believe students may have been behind the attacks in Mubi, but that town and the surrounding region also have suffered from a spate of killings by the Boko Haram radical Islamist sect.

The latest attack occurred between 10 p.m. Monday and 3 a.m. Tuesday when assailants invaded student accommodations outside the campus of the Federal Polytechnic Mubi college, said one of its students, Danjuma Aiso.

Twenty-seven students were killed, forcing the school to close Tuesday, said Aiso, citing information from the school's Students Affairs officer Mohammed Baba Karewa. The Associated Press could not immediately reach Karewa for comment.

Adamawa state police spokesman Ibrahim Muhammad said 25 men were killed: 19 students of Federal Polytechnic Mubi, three students of another college, an ex-soldier, a security guard and an elderly man.

"The crisis in Mubi is suspected to have been fueled by campus politics after an election at the (college)," Yushau Shuaib, the spokesman for the National Emergency Management Agency, said in a statement. Across colleges and universities in Nigeria, some fraternities have turned to gang violence to wield power on campuses.

"Boko Haram (attackers) open fire sporadically," said Muhammad. "In this case, the attackers called their victims by name and left other people in the room alone. This is not the modus operandi of Boko Haram."

"It is the work of insiders," Muhammad said.

Police said that student elections held last week could have been the motivation for the violence. But Aiso said students had recently found a written warning pasted on the gate of the female hostel inside the campus and which is widely believed to have been written by members of the Boko Haram sect. The message ordered authorities to evacuate the school, he said.

The college attack follows the killing Saturday of three students outside a university campus, about 100 miles away, in the city of Maiduguri, Boko Haram's spiritual home.

Ahmed Mohammed, a spokesman for the University of Maiduguri, said Monday the university was aware of the attack but that he could not comment since it occurred off school premises.

Boko Haram has launched frequent attacks in Maiduguri and, to a lesser degree, in Mubi. However, there was no claim of responsibility on Tuesday for either of the student attacks.