For years, the government has successfully suppressed lawsuits by civil liberties groups challenging the constitutionality of its surveillance programs.

But the leaks by Edward Snowden have eroded the government’s key legal defense and could mean that questions over whether the National Security Agency is breaking the law will be decided in open court.

“No matter what you think of the lawfulness of these programs, I think everyone should think their legitimacy or illegitimacy is better debated in public and decided by a court,” Alex Abdo, a lawyer for the American Civil Liberties Union (ACLU), said.