A federal appeals court on Friday ruled in favor of the Obama administration in a dispute over the National Security Agency's bulk collection of telephone data on hundreds of millions of Americans.

The U.S. Court of Appeals for the District of Columbia Circuit reversed a lower court ruling that said the program likely violates the Constitution's ban on unreasonable searches.

But the impact of the appeals court's ruling is uncertain because Congress has passed legislation designed to replace the program over the next few months. The appeals court sent the case back for a judge to determine what further details about the program the government must provide.

The ruling is the latest in a succession of decisions in federal courts in Washington and New York that at various points threatened the constitutionality of the NSA's surveillance program, but have so far upheld the amassing of records from U.S. domestic phone customers.

The appeals court ruled that challengers to the program have not shown "a substantial likelihood" that they will win their case on the merits.

Judge Janice Rogers Brown said it was possible the government would refuse to provide information that could help the challengers win their case. In a separate opinion, Judge Stephen Williams said the challengers would need to show they actually were targeted by the surveillance program.

Judge David Sentelle dissented in part, saying he would have thrown the case out entirely because the plaintiffs offered no proof they were ever harmed.

All three judges were appointees of Republican presidents.

The lawsuit was brought by Larry Klayman, a conservative lawyer, and Charles Strange, the father of a cryptologist technician who was killed in Afghanistan when his helicopter was shot down in 2011. U.S. District Judge Richard Leon ruled in 2013 that the collection was likely unconstitutional, but he put that decision on hold pending a government appeal.

An appeals court in New York ruled in May that the USA Patriot Act could not be interpreted to allow the NSA's bulk collection of phone surveillance.

But the Federal Intelligence Surveillance Court, a secret judicial body that oversees the surveillance program, ruled in June that the New York court was wrong. Neither of the decisions against the government interrupted the collection of electronic records while the legal disputes played out.

In June, Congress approved a measure that would phase out the program over the next six months and replace it with one that keeps the records with phone companies, but allows the government to search them with a warrant.

The uproar over the NSA's program began in June 2013 when former NSA contractor Edward Snowden leaked details of the surveillance to the news media. The agency has said it collects the phone numbers of calls made and received and how long a call lasts, but does not monitor the contents of a call. The FISA court authorizes the phone data program and reviews it about every 90 days.

Critics of the administration's surveillance program say collecting massive amounts of data on phone numbers is a violation of Americans' privacy rights. In response, the government has said it reviews only a tiny fraction of the information it collects.


Associated Press writer Stephen Braun contributed to this report.