A federal judge on Monday cleared the way for a ground-breaking suit that would let lawyers peek behind the curtain of the Bush administration’s warrantless electronic surveillance program.

Northern District Chief Judge Vaughn Walker ruled that lawyers for Al-Haramain Islamic Foundation can access material long held secret by the government. But he also wrote that the press and the public must now be kept largely in the dark.

Walker’s ruling was a comeback victory of sorts for Al-Haramain, the plaintiff in a rare suit challenging the constitutionality of the government’s surveillance regime.

“This decision has been three years in the making,” said Jon Eisenberg, of Oakland’s Eisenberg and Hancock, who represents Al-Haramain. “Judge Walker has removed a key obstacle to litigating this case on the merits and adjudicating the legality of the president’s warrantless wiretapping program. That’s good news for us and that’s good news for the country.”

Walker dismissed Al-Haramain’s complaint in July after ruling that the charity could not use a secret document, accidentally disclosed by the government years ago, to assert that authorities had spied on it and therefore show it was “aggrieved” — a status necessary to prove illegal wiretapping under the Foreign Intelligence Surveillance Act of 1978.

According to Washington Post reporter David B. Ottaway, who received the classified document from an Al-Haramain attorney in 2004, it contained “a summary of one or more conversations intercepted by the government.”

Eisenberg assembled a new complaint containing a series of public statements from government officials from which, he argued, surveillance of his clients could be inferred. On Monday, Walker wrote that the Oregon-based nonprofit had “without a doubt” made the case that it was “aggrieved.”

“While the court is presented with a legal problem almost totally without directly relevant precedents, to find plaintiffs’ showing inadequate would effectively render those provisions of FISA [that allow penalties for illegal surveillance] without effect,” Walker wrote.

His ruling simultaneously granted Al-Haramain’s motion under §1806(f) of FISA to review the classified document and denied the government’s third motion to dismiss the group’s case. He sided with Al-Haramain against the government’s “circular” argument that surveillance could never be proved unless the government itself admitted it had spied.

Anthony Coppolino, the government’s lead counsel, referred requests for comment Monday afternoon to Justice Department spokesman Charles Miller, who said the DOJ is “currently reviewing the court’s ruling.”

Walker’s decision sets in motion a process that seemed unlikely a few months ago: The government must now give Walker a copy of the secret document within two weeks and complete top-secret security clearances for Eisenberg and up to two other plaintiffs’ lawyers by Feb. 13, so that they can also review the document.

The public, however, could be excluded, Walker wrote.

“The court’s next steps will prioritize two interests: protecting classified evidence from disclosure and enabling plaintiffs to prosecute their action,” he wrote. “Unfortunately, the important interests of the press and the public in this case cannot be given equal priority without compromising other interests.”

But Walker suggested that Coppolino should now review all of the motions and evidence he has filed under seal, including the classified document, and see whether the government can declassify anything.

That is a decision that will confront the Obama administration, Eisenberg said, pointing to a speech by incoming Attorney General Eric Holder Jr. at the June national convention of the American Constitution Society.

Holder called certain U.S. policies enacted in response to the Sept. 11 attacks “excessive and unlawful” and said the government should obey the laws, like FISA, that govern domestic surveillance, according to media reports.

If Holder’s speech is any indication of how the Obama administration is likely to handle this case, Eisenberg said he has “some confidence that the veil of secrecy will be lifted and that this administration will repudiate the Bush notion of presidential power.”