By CHARLIE SAVAGE and JAMES RISEN
WASHINGTON — A federal judge ruled Wednesday that the National Security Agency’s program of surveillance without warrants was illegal, rejecting the Obama administration’s effort to keep shrouded in secrecy one of the most disputed counterterrorism policies of former President George W. Bush.
In a 45-page opinion, Judge Vaughn R. Walker ruled that the government had violated a 1978 federal statute requiring court approval for domestic surveillance when it intercepted phone calls of Al Haramain, a now-defunct Islamic charity in Oregon, and of two lawyers representing it in 2004. Declaring that the plaintiffs had been “subjected to unlawful surveillance,” the judge said the government was liable to pay them damages.
The ruling delivered a blow to the Bush administration’s claims that its surveillance program, which Mr. Bush secretly authorized shortly after the terrorist attacks of Sept. 11, 2001, was lawful. Under the program, the National Security Agency monitored Americans’ international e-mail messages and phone calls without court approval, even though the Foreign Intelligence Surveillance Act, or FISA, required warrants.
The Justice Department said it was reviewing the decision and had made no decision about whether to appeal.
The ruling by Judge Walker, the chief judge of the Federal District Court in San Francisco, rejected the Justice Department’s claim — first asserted by the Bush administration and continued under President Obama — that the charity’s lawsuit should be dismissed without a ruling on the merits because allowing it to go forward could reveal state secrets.
The judge characterized that expansive use of the so-called state-secrets privilege as amounting to “unfettered executive-branch discretion” that had “obvious potential for governmental abuse and overreaching.”
That position, he said, would enable government officials to flout the warrant law, even though Congress had enacted it “specifically to rein in and create a judicial check for executive-branch abuses of surveillance authority.”
Because the government merely sought to block the suit under the state-secrets privilege, it never mounted a direct legal defense of the N.S.A. program in the Haramain case.
Judge Walker did not directly address the legal arguments made by the Bush administration in defense of the N.S.A. program after The New York Times disclosed its existence in December 2005: that the president’s wartime powers enabled him to override the FISA statute. But lawyers for Al Haramain were quick to argue that the ruling undermined the legal underpinnings of the war against terrorism.
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.
Judge Walker’s opinion cataloged other such evidence and declared that the plaintiffs had shown they were wiretapped in a manner that required a warrant. He said the government had failed to produce a warrant, so he granted summary judgment in favor of the plaintiffs.
But Judge Walker limited liability in the case to the government as an institution, rejecting the lawsuit’s effort to hold Robert S. Mueller III, the F.B.I. director, personally liable.
Mr. Eisenberg said that he would seek compensatory damages of $20,200 for each of the three plaintiffs in the case — or $100 for each of the 202 days he said they had shown they were subjected to the surveillance. He said he would ask the judge to decide how much to award in punitive damages, a figure that could be up to 10 times as high. And he said he and his colleagues would seek to be reimbursed for their legal fees over the past five years.
The 2005 disclosure of the existence of the program set off a national debate over the limits of executive power and the balance between national security and civil liberties. The arguments continued over the next three years, as Congress sought to forge a new legal framework for domestic surveillance.
In the midst of the presidential campaign in 2008, Congress overhauled the Foreign Intelligence Surveillance Act to bring federal statutes into closer alignment with what the Bush administration had been secretly doing. The legislation essentially legalized certain aspects of the program. As a senator then, Barack Obama voted in favor of the new law, despite objections from many of his supporters. President Obama’s administration now relies heavily on such surveillance in its fight against Al Qaeda.
The overhauled law, however, still requires the government to obtain a warrant if it is focusing on an American citizen or an organization inside the United States. The surveillance of Al Haramain would still be unlawful today if no court had approved it, current and former Justice Department officials said.
But since Mr. Obama took office, the N.S.A. has sometimes violated the limits imposed on spying on Americans by the new FISA law. The administration has acknowledged the lapses but said they had been corrected.