One of them, Jon Eisenberg, said Judge Walker’s ruling was an “implicit repudiation of the Bush-Cheney theory of executive power.”

“Judge Walker is saying that FISA and federal statutes like it are not optional,” Mr. Eisenberg said. “The president, just like any other citizen of the United States, is bound by the law. Obeying Congressional legislation shouldn’t be optional with the president of the U.S.”

A Justice Department spokeswoman, Tracy Schmaler, noted that the Obama administration had overhauled the department’s procedures for invoking the state-secrets privilege, requiring senior officials to personally approve any assertion before lawyers could make it in court. She said that approach would ensure that the privilege was invoked only when “absolutely necessary to protect national security.”

The ruling is the second time a federal judge has declared the program of wiretapping without warrants to be illegal. But a 2006 decision by a federal judge in Detroit, Anna Diggs Taylor, was reversed on the grounds that those plaintiffs could not prove that they had been wiretapped and so lacked legal standing to sue.

Several other lawsuits filed over the program have faltered because of similar concerns over standing or because of immunity granted by Congress to telecommunications companies that participated in the N.S.A. program.

By contrast, the Haramain case was closely watched because the government inadvertently disclosed a classified document that made clear that the charity had been subjected to surveillance without warrants.

Although the plaintiffs in the Haramain case were not allowed to use the document to prove that they had standing, Mr. Eisenberg and six other lawyers working on the case were able to use public information — including a 2007 speech by an F.B.I. official who acknowledged that Al Haramain had been placed under surveillance — to prove it had been wiretapped.