Mashal Khan, who studied journalism at the Abdukl Wali Khan University in Mardan in Khyber Pakhtunkhwa province, was suspected by the mob of running Facebook pages that published blasphemous content, Deputy Inspector General (DIG) of Police Alam Shinwari said.
Khan was assaulted by a large group of students and appears to have succumbed to a gunshot wound, the DIG was quoted as saying in the Dawn newspaper.
The report said the two students were also believed to be promoting the Ahmadi faith on Facebook by the mob.
A mob of university students first surrounded Abdullah and forced him to recite verses from the Quran. Although he repeatedly denied he was an Ahmadi, the students beat him nonetheless.
More From This Section
The police, when alerted, reached the varsity and rescued Abdullah, after which the mob set its sights on Khan, who was in the hostel at the time, an eyewitness told the newspaper.
Khan was beaten and shot by the mob.
A video footage of the incident showed Khan lying on the ground surrounded by men, who beat him mercilessly with sticks. A student requesting anonymity claimed that several leaders of the university's student bodies were part of the mob.
Hostel warden Muhammad Ali claimed that: "Three to four thousand students were approaching. I was alerted that they were approaching, so I closed the gates but they broke in, found Mashal and fired at him and started beating him."
At least 15 people were arrested in connection with the incident, which occurred within the university premises. The campus was shut down until further notice. The hostels were vacated and a search for the remaining culprits was ongoing, police said.
Punjab's liberal governor Salman Taseer was killed in 2011 when he termed the regulations "black law".
And the minority Ahmadi community in Pakistan has been repeatedly targeted in sectarian violence in Pakistan for a long time by Islamic extremists, who view them as heretics.
On April 7, an Ahamdi doctor was shot dead by unidentified men in Punjab province. The incident happened 10 days after Malik Saleem Latif, an advocate from the Ahmadi community who was a cousin of Nobel laureate Abdus Salam, was shot dead by unidentified men in Nankana Sahib.