Mr. Siddiqui is a 2014 winner of the Albert Londres Prix award, the French equivalent of the Pulitzer Prize, and has written articles for several international publications, including The New York Times. He has also been become known as a frequent critic of the military on social media.

“It is public knowledge that the military establishment is annoyed with Taha’s Twitter activity,” said Iqbal Khattack, the Pakistan representative for Reporters Sans Frontieres. “What has happened is worrisome, but not surprising.”

A spokesman for the interior ministry said Interior Minister Ahsan Iqbal had sought an investigation into the attack on Mr. Siddiqui.

The media wing of the Pakistani Army declined official comment.

One military official, who spoke on condition of anonymity because he was not authorized to speak to the media on the matter, said he doubted the military was behind the attack. He said Mr. Siddiqui had written no articles recently that criticized the army and that it would be “counterproductive” to carry out such an attack based on a handful of objectionable tweets. The officer then scoffed at the idea that Mr. Siddiqui could have escaped an attack by a dozen trained security agents.

The threats to journalists and dissidents don’t end with the security agencies. Militants on both sides of the insurgency in Baluchistan Province, for instance, including sectarian groups who mainly fight on the military’s side of the conflict, are known for some of the most brazen attacks.

In the past year, another avenue of threat has been opened up. Under a sweeping new cybercrimes law passed last January, the authorities have also begun warning or prosecuting journalists and online activists. And that same month, at least five activists known for internet posts critical of the military suddenly disappeared. Four have since been returned and live in exile abroad.