Mashal Khan, a journalism student, was stripped, beaten, shot, and thrown from the second floor of his hostel at the Abdul Wali Khan university in Mardan, sources at the university said.
Graphic video footage from the scene shows dozens of men outside the hostel kicking and hurling projectiles at a body sprawled on the ground.
The killing comes as Pakistani authorities including Prime Minister Nawaz Sharif and Interior Minister Chaudhry Nisar Ali Khan have been increasingly vocal over blasphemy in recent weeks.
Blasphemy is a hugely sensitive charge in the conservative Muslim country, and can carry the death penalty. Even unproven allegations can cause mob lynchings and violence.
“The student has been brutally murdered by his fellow students,” Niaz Saeed, a senior police official, told AFP.
“He was badly tortured after being shot at a close range… He was beaten with sticks, bricks and hands,” Saeed said, adding that hundreds of people had been involved in the attack.
At least 11 students have been arrested so far, police said, and the university was closed indefinitely, with the campus largely deserted late Thursday evening.
“We are investigating the case but at this stage we cannot say anything” about the motive for the attack, Saeed said
However a police source told AFP that students had recently complained to university authorities about Khan’s alleged secular views.
The source said Khan and two friends had been in a debate with other students earlier Thursday about his religious views which became so heated that teachers had to lock him in a room for his safety.
But the enraged students grew to a mob and they attacked the room,” the source said.
A university official who spoke on condition of anonymity confirmed teachers had been forced to intervene in the debate “in a bid to save him and his two other friends, but the mob of students attacked the room and tortured and killed him”.