A federal appeals court has ruled in favor of the Obama administration in a dispute over the bulk collection of phone data on millions of Americans.

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

But the impact of the ruling is uncertain, now that Congress has passed legislation designed to replace the program over the next few months.

The court sent the case back for a judge to determine what further details about the program the government must provide.

The uproar over the surveillance program began in 2013 when former NSA contractor Edward Snowden leaked details to news organizations.