THERE was a time when Hamid Mir, Pakistan’s most famous journalist, had little reason to fear his work might put his life in danger. In a country where his trade has long been a dangerous game, he kept on the right side of the media’s two deadliest foes: Pakistan’s militants and its security establishment. He had good contacts with both after making a name for himself as a chronicler of the state-backed jihad in Afghanistan and Kashmir in the 1980s and 1990s. He is perhaps best known for interviewing Osama bin Laden in Afghanistan, just weeks after the attacks on America on September 11th 2001.

But on April 19th gunmen pulled up alongside Mr Mir’s car as he drove into Karachi from the airport, peppering the celebrity journalist with bullets. The attempt to kill Mr Mir, who survived the assault, came three weeks after a similar attack in Lahore on the car of Raza Rumi, a print and television journalist known for his liberal views. More than a dozen other media personalities have been warned their names are on a kill list. Less well-known journalists die all the time: more than 50 have been killed since 2001.

This was not the first attempt on Mr Mir’s life. A bomb was found under his car at his home in Islamabad in 2012, showing that Mr Mir, now the host of a popular political chat show, had made some powerful enemies. Over the years he had become more critical of militants, condemning suicide-bombers and the sectarian murder of Shias. He staunchly supported Malala Yousafzai, a schoolgirl activist who survived being shot by the Taliban for advocating the education of girls.

Mr Mir also criticised extra-judicial killings by security forces engaged in a dirty counterinsurgency in Balochistan, a southern province. Most recently, he insisted that Pervez Musharraf, a former military dictator, should not be allowed to dodge his trial for high treason.

Most journalists in Pakistan instinctively treat discussion of the army and militancy with great caution. Najam Sethi, the country’s most high-profile liberal commentator (and a former contributor to this newspaper), has taken to travelling in an armoured vehicle. In recent weeks at least two outspoken journalists, including Mr Rumi, have fled abroad for safety. There are now barely a handful of journalists prepared to challenge publicly the ideas of the radical religious right.

That is having a chilling effect on national discourse. In January the Express Tribune, the country’s most liberal paper, banned for several weeks all criticism of the Taliban on its pages after a deadly attack on company staff.

While Mr Mir was undergoing emergency surgery, his brother, another journalist, alleged the attack had been planned by the Inter-Services Intelligence directorate (ISI), the powerful spy agency of the armed forces. Mr Mir’s family are suspicious, because they think only Pakistan’s spooks could have known about his relatively last-minute trip to Karachi. Geo News, the popular station where Mr Mir works, reported the claims with gusto. Pakistan’s armed forces issued a statement denying any ISI role. Other media outlets did not follow Geo’s lead.

The owner of the Express Tribune ordered his staff to print a front-page story denouncing its media rival, which it said had “undermined the safety and security of Pakistan”. The defence ministry, meanwhile, lodged an official request for Geo’s broadcasting licence to be revoked.