A federal appeals court on Thursday reinstated a closely watched lawsuit accusing the federal government of working with the nation’s largest telecommunication companies to illegally funnel Americans’ electronic communications to the National Security Agency without court warrants.

While the 9th US Circuit Court of Appeals revived the long-running case brought by the Electronic Frontier Foundation, the three-judge panel unanimously refused to rule on the merits of the case, or whether it was true the United States breached the public’s Fourth Amendment rights by undertaking an ongoing dragnet surveillance program the EFF said commenced under the Bush administration following 9/11.

The San Francisco-based appeals court reversed a San Francisco federal judge who tossed the case against the government nearly three years ago. US District Judge Vaughn Walker, now retired, said the lawsuit amounted to a "general grievance" from the public, and not an actionable claim.

Walker also presided over the only case that found the Bush administration illegally spied on American citizens when it unleashed the NSA on Americans’ conversations, ruling that the government violated the rights of two American lawyers for al-Haramain, a now defunct Islamic charity. The government is appealing that ruling.

Writing for the majority on Thursday, Judge Margaret McKeown ruled (PDF) that the EFF’s claims "are not abstract, generalized grievances and instead meet the constitutional standing requirement of concrete injury. Although there has been considerable debate and legislative activity surrounding the surveillance program, the claims do not raise a political question nor are they inappropriate for judicial resolution."

The EFF’s allegations are based in part on internal AT&T documents, first published by Wired, that outline a secret room in an AT&T San Francisco office that routes internet traffic to the NSA.

"Today, the 9th Circuit has given us that chance, and we look forward to proving the program is an unconstitutional and illegal violation of the rights of millions of ordinary Americans," said Cindy Cohn, the EFF’s legal director.

But the appeals court also dealt EFF a blow.

In a separate opinion (PDF), the judges tossed the EFF’s lawsuit against the United States' largest telecoms, including AT&T—which the EFF accused of cooperating with the government’s warrantless surveillance program.

The appeals court sided with an act of Congress from July 2008, one voted for by then-Senator Barack Obama of Illinois, and then signed by President George W. Bush. The legislation handed the telcos retroactive immunity from being sued for allegedly participating in the surveillance program.

That led Judge Walker to toss the case against AT&T and others. The EFF contended on appeal that the legislation, which grants the president the power to grant immunity to the telcos, was an unlawful abuse of power.

The appeals court disagreed.

"By passing the retroactive immunity for the telecoms’ complicity in the warrantless wiretapping program, Congress abdicated its duty to the American people," EFF senior staff attorney Kurt Opsahl said. "It is disappointing that today’s decision endorsed the rights of telecommunications companies over those over their customers."

That said, the Bush administration, and now the Obama administration, have neither admitted nor denied the spying allegations — though Bush did admit that the government warrantlessly listened in on some Americans’ overseas phone calls, which he said was legal. But as to widespread internet and phone dragnet surveillance of Americans, both administrations have declared the issue a state secret—one that would undermine national security if exposed.

Toward that end, the federal appeals court sent the EFF’s case against the government back to the lower courts to determine whether it should be tossed on grounds that it threatens to expose state secrets. No court date has been set.

That lawsuit was filed immediately after Bush signed the immunity legislation for the telcos. The new lawsuit prompted the Obama administration to invoke the state secrets privilege—despite having announced he would limit his use of that doctrine at the beginning of his four-year term. Usually, lawsuits are dismissed when the government invokes the privilege.

Judge Walker wound up dismissing the revised lawsuit as a “general grievance” and did not rule on the state secrets claim.

Walker, however, did allow the al-Haramain case to proceed despite the feds’ invocation of the privilege—a rarity since courts are extremely deferential to the executive branch in matters of secrecy. The Supreme Court first fashioned the doctrine in a McCarthy-era lawsuit in a case where the government lied to the court to escape embarrassment and liability over an airplane crash.