A federal judge ruled on Friday that the NSA's phone surveillance program is lawful, dismissing in the process a lawsuit brought by the ACLU against the federal government.

"This blunt tool only works because it collects everything," Judge William H. Pauley said in the ruling, adding that the NSA has "adapted to confront a new enemy: a terror network capable of orchestrating attacks across the world."

"While robust discussions are underway across the nation, in Congress and at the White House, the question for this court is whether the government's bulk telephone metadata program is lawful," Pauley said. "This court finds it is."

Judge Pauley wrote that the Fourth Amendment does not apply to records held by private corporations, like phone companies.

But earlier this month, U.S. District Court Judge Richard Leon ruled the data collection program was likely unconstitutional because its "indiscriminate" and "arbitrary invasion" of privacy violated the Fourth Amendment.

Pauley's ruling likely sets up an eventual showdown over the program in the U.S. Supreme Court.

[Image via AP]