So he's going to swing – perhaps. On Saturday a Pakistani judge sentenced Mumtaz Qadri, the police bodyguard who assassinated the Punjab governor Salmaan Taseer, to death by hanging. The young policeman smiled and thanked God. "My dream has come true," he reportedly said.

It was a predictably theatrical turn from Qadri, a former nobody who murdered Taseer in cowardly fashion – shooting the governor 27 times in the back – and who has since revelled in the notoriety of his blood-stained celebrity. Equally predictable, alas, was the reaction on the streets outside.

Close to the courtroom in Rawalpindi, angry young men attacked a monument to the former prime minister Benazir Bhutto, defacing her image on the spot where she died in a suicide bombing in 2007. Down in Lahore, turbaned men with long sticks surged through the ancient Anarkali bazaar, thrashing traders who refused to shutter their shops in sympathy for Qadri.

Meanwhile the clerics engineering the protests – old men with soft palms and tinder-dry beards – issued po-faced statements decrying the sentence. Qadri was a good Muslim, they insisted, and Taseer got what he deserved. The governor had offended them by advocating reforms to Pakistan's antiquated blasphemy laws. In particularly they hated him for defending Aasia Bibi, a Christian mother-of-five sentenced to death under those laws last November. He deserved to die, they said.

Taseer's wife and children, in contrast, were silent. They stayed at home, busy worrying about their son and sibling, Shahbaz. The 27-year-old was kidnapped in August as he purred through Lahore in a sports Mercedes – his father's old car, in fact. Word has it he is being held in the tribal badlands of Waziristan; whether his captors are religious extremists, common criminals, or both, remains unclear.

The family is also reeling from character assaults. When Taseer was still alive, conservatives circulated photos of his children, lifted from their Facebook pages, showing them engaged in objectionable activity, such as dating and swimming in a swimming pool. After Taseer died, Qadri's lawyers aired allegations about his sex life, drinking habits and apparent taste for pork – proof, they said, of a licentiousness that justified his cold-blooded murder.

The distasteful spectacle is partly a product of Pakistan's social gulf. The Taseers inhabit the gilded bubble of a tiny elite whose westernised lives play out in Hello!-style photospreads of society magazines. In fact the Taseers own one of the most popular magazines. But it also goes to the heart of a bigger ideological crisis.

In theory, Pakistan is a country that welcomes all creeds and castes. But in practice it is proving to be anything but. Ask Faryal Bhatti, a teenage girl recently expelled from school for the crime of bad spelling.

A week ago last Thursday, the 13-year-old Christian girl was sitting an Urdu exam which involved a poem about the prophet Muhammad when she dropped a dot on the Urdu word naat (a devotional hymn to the prophet), accidentally turning it into lanaat, or damnation. Spotting the error, her teacher scolded her, beat her and reported the matter to the principal. The news soon flamed through her community in Havelian, 30 miles north of Islamabad.

Mullahs raged against Bhatti in their sermons; a school inquiry was hastily convened to examine the matter. Bhatti was expelled; her mother, a government nurse, was banished to another town, and the family has since fled Havelian in fear of their lives. All over a missing dot.

What accounts for such madness? In some parts Taseer's death has inspired a McCarthyite atmosphere in which nobody wants to seen to be soft on blasphemy. But there is also a more profound reason. Devotion to the prophet Muhammad is central to the faith of the Barelvi Sunnis, who make up the majority of Pakistani Muslims. Even a whiff of insult to the prophet can whip up feverish anger.

The core problem, in fact, is that the blasphemy furore exposes the fragility of the Pakistani state – ideological, legal and security-wise. The mixing of religion and politics has long troubled Pakistan, but over the past 30 years that dangerous cocktail has been spiked by the army's policy of nurturing extremists – hence men like Qadri who believe they have a right to kill in the name of God.

Meanwhile President Asif Ali Zardari's government has shown zero leadership when it comes to reforming the blasphemy law – in fact, cowardly ministers have run a mile from any suggestion of change. And those who do dare to stand up for progress – or just the rule of law – live in fear of the next Qadri-style hit.

In truth, Taseer's baby-faced killer is unlikely to be hanged any time soon. A lengthy appeals process is just starting, and the Zardari government has imposed an unofficial moratorium on capital punishment. But the judge who sentenced him, Pervez Ali Shah, faces perhaps shorter odds.

Judges who rule the "wrong" way on blasphemy face immense dangers in Pakistan. In 1997 extremists burst into the chambers of a high court judge who acquitted an accused blasphemer three years earlier, and shot him dead. Justice Shah will be fearing a repeat.

Reporters at Qadri's hearing on Saturday noted that the judge slipped from the courtroom via the back door. He knows he is a marked man. Now only time will tell if the discredited Pakistani state can stand up for at least one good man.