LONDON — Throughout the long months of the Leveson inquiry into the behavior and standards of the British press, the riddle that permeated its scrutiny of the nation’s newspapers was this: If journalists cast themselves as protectors of public probity, who guards the guardians?

A comparable question now resonates for the authorities themselves: If Britain’s security apparatus is designed to shield the land against threat, who will ensure that the laws that empower them to defend against terrorism are not abused?

The concerns surfaced after the nine-hour detention, while transiting Heathrow Airport, of David Miranda, the partner of the journalist Glenn Greenwald who has reported for The Guardian on disclosures by the former National Security Agency contractor Edward J. Snowden into the agency’s intelligence-gathering.

Mr. Miranda was held under contentious laws supposed to protect Britons from terrorism, provoking worries that the legislation — Schedule 7 of the Terrorism Act 2000, to give it its full name — was being deployed without justification.