A federal judge has rejected the Bush administration's justification for warrantless wiretapping of suspected terrorists and ruled that federal agents had eavesdropped illegally on a U.S.-based Islamic charity.

The ruling Wednesday by Chief U.S. District Judge Vaughn Walker of San Francisco focused on the surveillance of a single organization, the Al-Haramain Islamic Foundation - the only plaintiff in dozens of wiretapping lawsuits around the nation that had evidence its calls were intercepted.

But Walker's reasoning struck at the heart of the program President George W. Bush authorized after the terrorist attacks of Sept. 11, 2001, allowing agents to intercept phone calls and e-mails between Americans and suspected foreign terrorists without a warrant.

When Bush acknowledged the surveillance in December 2005, he claimed the power to override a 1978 law, passed in response to revelations of wiretapping of political dissidents, that required the government to obtain advance court approval for each act of eavesdropping.

Walker said Wednesday that Bush lacked that authority.

Under the argument advanced by the Bush administration, "executive branch officials may treat as optional ... a statute (the 1978 law) enacted specifically to rein in and create a judicial check for executive-branch abuses of surveillance authority," the judge said.

That "theory of unfettered executive-branch discretion" holds an "obvious potential for governmental abuse and overreaching," Walker said.

Al-Haramain's lawyer, Jon Eisenberg, said the decision amounted to a finding that the entire program was illegal.

"Inherent in what Walker has done in this case is a determination that President Bush's program of warrantless surveillance was unlawful," Eisenberg said. "Everybody has to follow the law, including the president."

The Bush administration said it ended the program in mid-2008 and allowed a special court, created by the 1978 law, to review the wiretaps. The administration did not disclose the scope of that review, and neither Bush nor President Obama has revealed the extent of any continuing surveillance.

The ruling was also a rebuff to Obama. Although he had criticized Bush's surveillance program while running for president, Obama's Justice Department has repeatedly sought to dismiss the Al-Haramain suit and fought any judicial review of the wiretapping program.

Secret evidence

The department argued that courts lacked the power to decide whether any alleged surveillance was legal because all evidence related to wiretapping was a secret whose disclosure would aid the nation's enemies. Department lawyers refused to tell Walker whether they thought the overall program was legal.

Walker described the Justice Department's arguments as "nit-picking" and "acrobatics." He said the government had spurned every offer to justify its conduct in closed-door proceedings that could have protected any state secrets.

The Obama administration now must decide whether to appeal the ruling and invite the first decision by a higher court on the validity of the surveillance program.

The Justice Department was noncommittal about an appeal and instead issued a statement stressing Attorney General Eric Holder's recent restrictions on government claims of secrecy. The new rules require a high-level Justice Department committee to review all such claims, with the attorney general having the last word.

Paper trail

Other lawsuits challenging the wiretapping program have stumbled over a judicial requirement that the plaintiffs show evidence they were wiretapped. But the government inadvertently sent a classified document in 2004 to Al-Haramain, a now-defunct charity that was based in Oregon, reportedly showing that two of its lawyers had been wiretapped.

Several months after the surveillance began, the government classified Al-Haramain as a terrorist organization, a description its leaders called false.

The group returned the document at the government's request and was barred from using it as evidence. But Walker said Al-Haramain had established - through public statements by an FBI official, other nonclassified evidence and the timing of its lawyers' phone calls and the terrorist designation - that it had been illegally wiretapped.

Eisenberg said his clients, Al-Haramain and the two lawyers, would ask for the damages the law allows - $20,200 each, or $100 for each day of illegal surveillance - plus punitive damages and attorneys' fees.