IN THE room of Mashal Khan, a student at Abdul Wali Khan University in Mardan, a dusty town in north-west Pakistan, the late occupant’s handwriting is on almost every surface. Some of his scribblings in felt-tip pen are banal (“You beauty”) or crude (“Get your burger-flipping ass outta here”). But many hint at an idealistic and fiercely independent young mind: “Freedom is the right of every individual” and “Be crazy, curious and mad!” These were injunctions that Mr Khan, a journalism student, upheld—and that got him killed.

On April 13th Mr Khan was pulled from the room by a crowd of fellow students. The violence that followed, partially recorded on a mobile phone, was staggeringly brutal. The attackers shot Mr Khan twice, dragged his corpse through hallways, beat it with planks and stripped it naked.

Earlier in the day a fellow journalism student had accused Mr Khan of blasphemy. That allegation appears to have triggered the attack. The penalty for blasphemy under Pakistani law is death. But it is increasingly common that vigilantes take the law into their own hands before courts get involved. At least 65 people have been murdered by mobs for allegedly insulting Islam since 1990. As often in such cases, there was no evidence against Mr Khan, apart from the claims of the classmate who denounced him, Wajahat, a disgruntled young man with a fondness for the blood-curdling rhetoric of Islamist televangelists.

Mr Khan’s murder was the first mob blasphemy killing in Khyber Pakhtunkhwa province. It was also the first blasphemy killing at a university. Before this, the most horrific such attack had involved villagers who burned a Christian couple in a brick kiln in 2014. That well-off and literate young men were responsible for Mr Khan’s murder troubles many Pakistanis. Dawn, a liberal newspaper, lamented that a “cancer” afflicting Pakistan had even reached a place where “minds are supposed to be enlightened”.

Allegations of blasphemy are often made by those with other grievances against the accused: the charge can be used as an excuse to knock off a business rival or someone who causes the accuser trouble. Three days before Mr Khan’s death, he had alleged that some members of the university’s staff were corrupt. Several of them, who have links with the Awami National Party, a secular Pushtun group which controls the university, have been arrested in connection with Mr Khan’s death.

The participation of so many students in Mr Khan’s murder is a sign of growing religious intolerance on campuses. Pakistan’s Islamist parties have been fanning the flames of it: since the assassination in 2011 of Salman Taseer, a governor of Punjab who had pushed for reform of blasphemy laws, support for the current ones appears only to have grown.

Student organisations sympathetic to the Islamists have taken up the cause. They often wield the threat of a blasphemy allegation in order to browbeat university departments into scrapping courses in music or comparative religion. A liberal lecturer at Bahauddin Zakariya University in the city of Multan was accused of blasphemy in 2013 by Islamist undergraduates; he remains in jail. His first lawyer was assassinated by unknown assailants.

Alarmingly, it took two days for the prime minister, Nawaz Sharif, to condemn Mr Khan’s murder. He has helped to stoke hysteria about blasphemy himself: a few weeks ago he ordered police to hunt for blasphemous content on social media. In the eyes of Huma Yusuf, a columnist, blasphemy-related violence is now a more intractable problem in Pakistan than terrorism. A campaign against militant groups has sharply reduced deaths from terrorism. But, as Ms Yusuf notes: “You can’t use the same tactics with the entire population.” What is needed is better teaching in schools, religious and secular alike, about the evils of vigilante justice; a government that is far quicker to condemn it; and, crucially, legal change. Bringing any of that about will be hard: cases like Mr Khan’s show all too clearly the perils involved.