My op-ed for The New York Times
The appalling murder in Karachi last week of Sabeen Mahmud is a stark reminder of challenges that human rights defenders face in Pakistan. Ms. Mahmud, 39, had devoted her life to creating an alternative to the religious nationalism promoted by the Pakistani state over recent decades, which has led to a proliferation of violent jihadist organizations. She was gunned down on Friday night as she left the arts center she had founded.

In the country’s largest city, troubled by violence and crumbling institutions, Ms. Mahmud created a hub to promote the arts, harness creative talent and foster democratic dialogue. Since 2007, The Second Floor, commonly known as T2F, had evolved as a small but significant arena for pluralist and secular movements in the Islamic Republic. In Pakistan’s deeply conservative, repressive society, this was a kind of liberation theology.

Hours before she was shot, Ms. Mahmud, a tech entrepreneur as well as a social activist, hosted human rights advocates who were campaigning against enforced disappearances and extrajudicial killings in insurgency-hit Balochistan Province. After the government ordered the cancellation of the event, which was called “Unsilencing Balochistan” and was to be held at the Lahore University of Management Sciences, Ms. Mahmud offered T2F as a venue.

The government is deeply worried about the insurgency in Balochistan. The commonly held — and vigorously promoted — view is that Pakistan’s great rival, India, is supporting the insurgency. Thus advocating for the rights of the Baloch people is regarded as treasonous.

This act of defying state censorship by Ms. Mahmud’s arts center appears to have been the reason for her death. While some suspect the hand of the government in her assassination, the truth is that the state has long since ceased to exercise a monopoly over violence in Pakistan. As authority has fragmented, extremist groups that originally acted at the behest of the state now also act autonomously to perpetrate violence.

In the wake of the Pakistani Taliban’s bloody attack on a military school in Peshawar in December, the government and the military have begun to try to wrest control of the situation — but their task is like repacking Pandora’s box. In recent years, scores of human rights defenders, public intellectuals, journalists and secular politicians have been attacked or killed in Pakistan. Perpetrators are rarely, if ever, put on trial.

Anyone who espouses liberal, secular views and becomes a public figure is a potential target. In Lahore, last March, my driver was shot dead and a guard was injured by unknown assailants in an attempt on my life. I was lucky to escape alive. The police later claimed that Islamic extremists were responsible. A month later, the popular television journalist Hamid Mir survived a similar attack in Karachi. He still has three bullets in his body. A year later, the assailants have not been identified.

When Mr. Mir’s family and his media group voiced a view that Pakistan’s spy agency, the Inter-Services Intelligence directorate, or ISI, was behind the shooting, they were forced to recant. The TV channel’s transmission was blocked for a time, and the rival media groups moved quickly to prove their loyalty to the military. Since then, hard-earned press freedoms have suffered still further. Television news no longer even reports on “sensitive” issues like the Balochistan insurgency.

The seeds of today’s social conflict were sown during the dictatorship of Gen. Mohammad Zia ul-Haq, who governed from 1977 to 1988. President Zia radically altered the constitutional nature of the Pakistani state, ushering in a set of sectarian laws that, among other things, reduced the value of a woman’s testimony to half that of a man’s. The West bears some responsibility for supporting the Zia regime because that advanced its Cold War interests in Afghanistan, but after 1989, Pakistan had a choice.

Unfortunately, it opted to continue with General Zia’s agenda of promoting religious radicalization at home and using jihadist groups as tools of foreign policy. Even school textbooks reflected an India-hating, militarized Islamic nationalism as the underpinnings of the country’s identity.

Subsequent governments have been unwilling or unable to reverse this trend for two generations. Ms. Mahmud was one who strove to present alternative ideas about Pakistan for its youthful population: The median age in Pakistan is under 23. Many young people regarded Ms. Mahmud as an inspirational model.

Most of T2F’s regulars came at first from relatively affluent backgrounds, but recently the space had started to attract young men and women from low-income communities, too. It was also a place where transgender citizens could come and be treated with respect.

In 2013, Ms. Mahmud ran an online campaign to counter efforts by Islamists to suppress Valentine’s Day. That led to death threats, but with courage and optimism, she stuck to her work.

Ms. Mahmud also championed one of Pakistan’s last remaining domains of free expression — social media. That, too, is now endangered: A parliamentary committee recently approved the draft of a cybercrime law that would curtail digital freedoms.

Pakistan’s beleaguered liberals must reorganize themselves and mobilize civil society support. They must exert pressure on Parliament and the government to investigate properly and prosecute cases like Ms. Mahmud’s assassination. In addition, they must lobby for reforms of the judicial system to hold the executive authorities accountable and to enforce Pakistan’s fading press freedoms.

The international community should recognize that progress on fighting the Taliban is only part of the story. The Pakistani state must also be pushed to respect civil liberties and not allow the wanton slaying of liberal activists. Unless it does so, Pakistan’s democracy will slide back toward a disastrous authoritarianism.