The Obama administration has lost its argument that a potential threat to national security is grounds to stop a lawsuit challenging the government's warrantless wiretapping program.

A federal Appeals Court in San Francisco on Friday rejected the Justice Department's request for an emergency stay in a case involving a defunct Islamic charity.

Yet government lawyers signaled they would continue fighting to keep the information secret, setting up a new showdown between the courts and the White House over national security.

The Obama administration, like the Bush administration before it, claimed national security would be compromised if a lawsuit brought by the Oregon chapter of the charity, Al-Haramain Islamic Foundation, were allowed to proceed.

Now, civil libertarians hope the case will become the first chance for a court to rule on whether the warrantless wiretapping program was legal. It cited the so-called state secrets privilege as a defence against the lawsuit.

"All we wanted was our day in court, and it looks like we're finally going to get our day in court," said Al-Haramain's lawyer, Steven Goldberg. "This case is all about challenging an assertion of power by the executive branch, which is extraordinary."

A Justice Department spokesman declined to comment.

But hours after the court made its decision, government lawyers filed new papers insisting they still did not have to turn over any sensitive information.

"The government respectfully requests that the court refrain from further actions to provide plaintiffs with access to classified information," the filing said, suggesting the Obama administration may appeal the matter again to keep the information secret and block the case from going forward.

The decision by the three-judge Court of Appeals for the 9th Circuit is a setback for the new Obama administration as it adopts some of the same positions on national security and secrecy as the Bush administration.

Review ordered

Earlier this month, Attorney General Eric Holder ordered a review of all state secrets claims that have been used to protect Bush administration anti-terrorism programs from lawsuits.

Yet even as that review continues, the administration has invoked the privilege in several different cases, including the Al-Haramain matter.

The case began when the Bush administration accidentally turned over documents to Al-Haramain attorneys. Lawyers for the defunct charity said the papers showed illegal wiretapping by the National Security Agency.

The documents were returned to the government, which quickly locked them away, claiming they were state secrets that could threaten national security if released.

Lawyers for Al-Haramain argued that they needed the documents to prove the wiretapping.

The U.S. Treasury Department in 2004 designated the charity as an organization that supports terrorism before the Saudi Arabian government closed it. The Bush administration redesignated it in 2008, citing attempts to keep it operating.

The Appeal Court eventually agreed that the disputed documents were protected as state secrets. But the court ruled that the Oregon chapter of Al-Haramain could try to find another way to show it had standing to sue the government over domestic wiretapping.

A number of organizations, including the American Civil Liberties Union, tried to sue the government over warrantless wiretapping but were denied standing because they could not show they had been targeted.

Ann Brick, a lawyer for the ACLU of Northern California, said the court has now crafted a way to review the issue in which "national security isn't put at risk, but the rule of law can still be observed."