LAST week a federal appeals court panel ruled that the NSA's indiscriminate hoovering of phone-call metadata, first revealed by the leaks of Edward Snowden, is not authorised by the Patriot Act. The pertinent section of the anti-terror bill, Section 215, is set to expire on June 1st, so the 2nd Circuit's ruling comes at a opportune time for congressional opponents of the NSA's bulk data-collection programme. "How can you reauthorise something that’s illegal?” asked Harry Reid, the Senate minority leader. "You can’t. You shouldn’t". On May 13th the House overwhelmingly approved legislation to end the government’s bulk collection of phone records. The Senate will soon debate the matter. This development also clarifies the stances of several GOP presidential hopefuls, and the stakes of the primaries. Marco Rubio, a Florida senator, and Chris Christie, governor of New Jersey, hawkishly favour just the sort of reauthorisation of the Patriot Act's current provisions that Mr Reid opposes. Jeb Bush, formerly the governor of Florida, is on the record as an enthusiast of the NSA's phone metadata sweeps, and presumably wants them to continue. Meanwhile Rand Paul, a Kentucky senator, seeks to burnish his civil-libertarian credentials with a promise to filibuster any attempt at clean reauthorisation. Ted Cruz, the junior senator from Texas, has staked out a middle ground by co-sponsoring the "USA Freedom Act", which would end the bulk collection of phone records while extending other parts of the bill cherished by the security establishment.

More important than campaign-trail jockeying, however, is the substance of the decision. It would seem to vindicate Edward Snowden, a former NSA contractor whose controversial leaks brought the formerly secret programme to light. According to the court, not only does the "staggering" quantity of information harvested by the NSA exceed the Patriot Act's statutory ambit, but the government's argument in defence of bulk-collection "defies any limiting principle". Moreover, the court says, the programme could not have been "legislatively ratified", given the fact that only a few members of congress, and none of the public, were even aware of its existence prior to Mr Snowden's leaks, much less the details concerning its "staggering" scope.

The ruling has important implication for the way we understand the role of whistle-blowers such as Mr Snowden. "Telling the public about the phone dragnet didn’t expose a legitimate state secret", writes Conor Friedersdorf of the Atlantic. "It exposed a violation of the constitutional order....Tens of millions of innocent U.S. citizens were ... subject to invasions of privacy that no law authorized". Without Mr Snowden's leak, which led the ACLU to challenge the NSA's programme in court, the "the NSA’s unlawful behavior would’ve continued, unknown to the public and unreviewed by Article III courts."

This of course does not vindicate all of Mr Snowden's leaks, which go well beyond the revelation of the NSA's phone-records sweep. But it helps to illustrate the indispensable role whistle-blowers play in defending the rights of citizens when the state insists on acting behind a veil of official secrecy, outside the normal scope of democratic and judicial oversight. When the executive insists on shielding the state's intelligence programmes not only from public scrutiny, but also from meaningful review by the duly-elected representatives of the people, there is no safeguard in place to protect the rights of the citizenry beyond the conscience of the spies and their executive-branch masters.

The American system was designed with the assumption that power is dangerous and will be abused, when possible. A system of checks and balances attempts to limit these potential abuses, as each branch of government polices the power of the other branches. Shielding portions of the executive from the view of the legislative and judicial branches effectively breaks this system. The only way for an illegal programme like the NSA's phone metadata surveillance to come into view is, rather perversely, for a public-spirited citizens in the employ of the spy agency to break the law and leak classified information to the public. It is sometimes argued that surely there must be a way for public-spirited folks with security clearances to report abuses of the system from within the system, keeping classified material under wraps. But it is the nature of abusive systems to deny that there are any abuses, and to move swiftly and decisively to silence anyone who claims otherwise. People of conscience, like Mr Snowden, therefore play an essential role in policing executive power and protecting the rights of citizens.

It is understandable for Barack Obama's administration to seek to punish Mr Snowden for exposing this illegal programme. This paper has argued that it would have been better for America had Mr Snowden sought to defend himself in court. Yet the government's disproportionately harsh treatment of other whistle-blowers, such as Chelsea Manning, who earned 35 years in prison for leaking classified documents to WikiLeaks, a website, has understandably sent Mr Snowden hiding. The government's crusade against whistle-blowers sends the message that the state's strategic interests in acting under the cover of unaccountable secrecy not only outweigh the rights of its citizens, which legitimate governments are instituted to protect, but also the principles of democratic government, from which liberal states are thought to derive the authority to act at all. The administration seems keen to communicate that anyone privy to state secrets must refrain from revealing them, even (especially?) when the content of the secrets expose the state as acting criminally and in conflict with the conditions of its own legitimacy.

Perhaps Mr Snowden went too far, and leaked too much, too indiscriminately. He deserves to be tried and punished for his excesses. But he also deserves some admiration and gratitude for risking his own freedom to protect the freedom of his fellow citizens. Any punishments meted out must weigh this service in the balance.

When settling on a champion in the coming race, Republican primary voters, many of whom profess to care a great deal about liberty and the perils of overweening government, are lucky to face a real choice. If they want a more transparent government that depends less on secrecy, Mr Paul would seem to be their man. If they want to maintain the sort of shadow government that needs the likes of Mr Snowden as a check against secret executive-branch abuses, Mr Cruz seems to be staking out this ground. And if they want a government, like Mr Obama's, dedicated to squashing Snowdens in defence of the principle that it ought to be able to violate its citizens' rights with impunity, Messrs Rubio, Christie and Bush would seem to fit that bill. At this point, the positions of the rest of the field are rather less clear, but they all should pipe up. The issue works as an unusually useful litmus test of a candidate's commitment to limited government and the rule of law, and voters deserve to know.