“You want to be a hero? We’ll make you a hero,” said the men in police uniforms who last month mercilessly beat up Waqar Kiani, a freelance Pakistani journalist, in Pakistan’s capital Islamabad. Kiani’s offense? Five days earlier, an account of his abduction and torture by suspected Pakistani intelligence agents in 2008 was published in the Guardian. At that time, Kiani had been on assignment for the Guardian’s London-based reporter Ian Cobain, who was investigating what has since been well-documented — the alleged cooperation between Pakistani and British intelligence in the detention and abuse of suspected militants who were British nationals of Pakistani origin.

Kiani clearly crossed a line. Pakistan’s army and its intelligence agencies, especially the top spy agency, the military-controlled Directorate of Inter-Services Intelligence (ISI) have long been the most powerful institutions in a state where the military has ruled for half of its history since Pakistan was created in 1947. And the army and the ISI don’t like anyone looking too closely into their affairs — as Pakistani journalists have found to their peril.

It is easy for the Intelligence Bureau, the civilian spy agency, and the ISI to threaten journalists, to abduct, beat, and torture them, and increasingly, kill them, because they can do so with complete impunity.

Ali Dayan Hasan, Pakistan representative for Human Rights Watch, says that till date no Pakistani intelligence personnel or ISI officials have ever been held accountable, despite credible allegations of human rights abuses against them.

This presents little hope of justice for Saleem Shahzad, the Pakistani journalist killed last month. Shahzad, an investigative reporter who contributed to Asia Times Online, had written extensively on links between the militants and the military (his new book, Inside al Qaeda and the Taliban: Beyond bin Laden and 9/11, had just been published). His latest reports came in the wake of the May 1 U.S. raid that killed Osama bin Laden and the May 22 terrorist attack on Pakistan’s main naval base in Karachi. He wrote that the attack on the naval base was made possible because suspected al-Qaeda operatives had infiltrated the navy.

His final story came at a time when the army and the ISI were already reeling under unprecedented domestic criticism as a result of the discovery and killing of Osama bin Ladenin Abbottabad, a garrison town just 67 miles from Islamabad, and the attack on the naval base.

Most human rights groups, journalists, and according to the New York Times, even some U.S. intelligence sources suspect the ISI of torturing and killing Shahzad. Under pressure from the growing public outrage in an environment where their credibility was already under scrutiny,in a rare public statement, the ISI denied any culpability.

Hasan, who has been summoned by the judicial commission probing Shahzad’s case to appear before it on July 9, says Shahzad had been threatened by the ISI last October. Fearing for his life, Shahzad gave HRW the names of the ISI officials he met with, as well as minutes of the meeting, asking the rights group to release the information should anything happen to him. Hasan says Shahzad had been threatened by the ISI twice more since then. “When he disappeared [on May 29] we were contacted by his wife who was instructed by him to ensure that he was released with minimum harm,” says Hasan. But he would not be released — two days later, Shahzad’s dead body was found on a canal bank, 75 miles south of Islamabad.

The “principal threat to media freedom in Pakistan,” Hasan told me in this interview, “stems from its military, its intelligence agencies, from the Taliban and other militant actors and armed groups, and certainly to some extent from the judiciary which uses the contempt of court proceedings to muzzle criticism of the institution.”

“Investigative journalism is never easy anywhere,” says well-known Pakistani investigative reporter Umar Cheema. But in Pakistan, “the threat is fatal,” he says. And Cheema should know. A reporter for Pakistan’s English-language newspaper, the News, Cheema was picked up from the streets of Islamabad on September 4, 2010 by men in police uniforms, and beaten and humiliated for seven hours. Cheema suspects the men were intelligence agents disguised as police.

Both a joint investigation team and a judicial commission were set up in Cheema’s case but no justice has been meted out. Plus, though the judicial commission submitted its report to the government in December, says Cheema, and despite repeated calls for the findings to be made public, the government has not yet done so.

So far, the only journalist’s murder that has been prosecuted in Pakistan is the Wall Street Journal reporter Daniel Pearl who was killed in 2002 by militants. Even in that case, whether justice was achieved is questionable. According to a report by the Pearl Project, an investigative project of the Center for Public Integrity, more than a dozen of the militants involved in his murder remain at large.

Since Pearl’s killing, sixteen journalists (including Shahzad) have been victims of targeted killings, according to the Committee to Protect Journalists. An equal number of journalists are killed “as a result of indiscriminate violence or crossfire during conflicts” according to CPJ, which labeled Pakistan “the deadliest country for journalists” in 2010. In a blog post, Bob Dietz, CPJ’s Asia coordinator wrote: “With five dead at mid-2011 from bombings and targeted killings, the trend seems at a pace to be as bad or even worse in 2011.”

Interestingly, increased attacks against journalists also correspond with the period that the Pakistani media was liberalized by former military dictator Gen. Pervez Musharraf. Starting in 2002, Musharraf encouraged the creation of independent and privately-owned broadcast media (read this great 2007 piece by Shahan Mufti in the Columbia Journalism Review on Musharraf’s fraught relationship with the media) and since then, the media has arguably been the one industry in Pakistan to experience steady growth.

This new media is more vocal. And while it often just panders to public opinion, for instance touting conspiracy theories on issues related to the United States, it also challenges those in power. More than ever before, the media is questioning the conduct of the security forces, especially the army and the ISI in the war against terrorism. Questions about Osama bin Laden being found in a garrison town not far from the capital, questions about government corruption, questions that make people in the corridors of power nervous — questions for which journalists end up paying with their lives.

Public outcry in the wake of Shahzad’s death has had little effect on the ISI and the army as they continue to issue veiled threats to journalists and intimidate through other means. Little will change in this regard until the army and the ISI are made more accountable for their actions.

Meanwhile, media organizations will have to take the security of journalists in their own hands. Pakistani journalist Huma Imtiaz writes news organizations should provide adequate protection to journalists covering sensitive situations such as military operations or religious processions and provide them with standard gear such as bulletproof jackets and helmets as well as safety training.

CPJ’s Dietz writes that there is also talk of organizing a quick-response support system for journalists under threat, set up along the lines of the Citizen-Police Liaison Committee in Karachi, which some say, has been effective in incrementally improving public safety and security.