The National Security Agency’s bulk collection of Americans’ phone records is bound for review by the U.S. Court of Appeals for the D.C. Circuit — just as the court is set to undergo significant change.

U.S. District Judge Richard Leon ruled last week that the government’s surveillance efforts “almost certainly” violated the Fourth Amendment. Leon was caustic in his criticism of the phone data collection — James Madison “would be aghast,” the judge wrote — and skeptical of the argument that protection of the national security justifies the program.

The judge blocked the collection of phone record information of lawyer and activist Larry Klayman and another challenger. He stayed that order pending a government appeal.

The D.C. Circuit would become the first federal appeals court to confront the NSA metadata program in the post-Edward Snowden world. Snowden, the former NSA contractor, disclosed to reporters a cache of documents detailing the scope of surveillance efforts — triggering privacy suits in federal courts across the country and calls for reform.

Three new judges appointed by President Obama could be sitting on the D.C. Circuit by the time a panel is chosen to review Leon’s 68-page ruling, giving the court a new dynamic.

“It makes it that much more likely you might see a range of opinions,” said Stephen Vladeck, a professor at American University Washington College of Law. Greater diversity on the bench, he said, meant a greater likelihood of disagreement among judges about Fourth Amendment issues in the case. Lawyers might be more willing to pursue en banc review of a one-sided panel ruling, he added. However, Vladeck warned it would be “too much of an overstatement to think it would affect the outcome.”

D.C. Circuit Senior Judge Douglas Ginsburg recently challenged any assertion that the court is a “political partisan.” The “overriding ideology in the D.C. Circuit is that of agency deference, not policy preference,” Ginsburg wrote in a paper, “The Behavior of Federal Judges: A View from the D.C. Circuit.” Leon was appointed to the bench in 2002.

A spokesman for the U.S. Department of Justice, Andrew Ames, said in an email that the government was reviewing Leon’s decision. “We believe the program is constitutional as previous judges have found,” Ames said.

Klayman was triumphant. “It didn’t come as a surprise because this is the largest abuse of constitutional rights in American history,” he said, calling Leon “an American hero.” Klayman last week asked Leon for additional time to file papers seeking class certification.

Klayman’s suit, seeking an injunction to block the government’s collection of phone records, accused the NSA of violating constitutional rights and exceeding its authority under the Administrative Procedure Act.

‘ALMOST-ORWELLIAN’

For more than seven years, Leon noted, the government had collected telephone records that revealed information about what phone numbers made and received calls, when the calls took place and how long they lasted. The government said it used the metadata to identify connections to terrorists and didn’t include information about who made the calls or what they discussed.

Describing the government’s surveillance efforts as “almost-Orwellian,” Leon concluded the challengers were likely to succeed on their privacy claims.

The judge said he had “serious doubts” about the effectiveness of the telephone record-collection program in aiding time-sensitive terrorism investigations. As a result, he said, the plaintiffs showed their privacy interests likely outweighed the government’s interest in the data.

“I cannot imagine a more ‘indiscriminate’ and ‘arbitrary invasion’ than this systematic and high-tech collection and retention of personal data on virtually every single citizen for purposes of querying and analyzing it without prior judicial approval,” Leon wrote.

Leon dismissed the government’s argument that the 1979 Supreme Court case Smith v. Maryland — which involved the warrantless use of a “pen register” — permitted the bulk collection of telephone metadata. (The authorities use pen registers to record dialed numbers.)The judge said he was “convinced that the surveillance program now before me is so different from a simple pen register that Smith is of little value in assessing whether the Bulk Telephony Metadata Program constitutes a Fourth Amendment search.”

“To the contrary,” Leon wrote, “I believe that bulk telephony metadata collection and analysis almost certainly does violate a reasonable expectation of privacy.”

Leon said the technology that enabled the government to store and analyze the metadata of every telephone user in the United States “is unlike anything that could have been conceived in 1979.” The judge added that the amount of information contained in phone records today is greater as well. He said he could no longer use “as my North Star a case that predates the rise of cell phones.”Klayman isn’t the only plaintiff fighting the NSA in court. As his case moves toward a likely appeal, lawsuits are pending in several federal trial courts. On Nov. 22, U.S. District Judge William Pauley III in New York heard arguments in one of those cases, American Civil Liberties Union v. Clapper. Pauley, according to press reports, expressed skepticism over the notion that Congress — in reauthorizing the Patriot Act — knew it had approved the bulk collection of billions of phone records.

ACLU Deputy Legal Director Jameel Jaffer, who argued in the ACLU case, praised Leon’s ruling. “This is a strongly worded and carefully reasoned decision that ultimately concludes, absolutely correctly, that the NSA’s call-tracking program can’t be squared with the Constitution,” Jaffer said.

Other lawyers who are closely following constitutional challenges to NSA surveillance were not as convinced on the legal soundness of Leon’s conclusion.

Orin Kerr, a Fourth Amendment scholar who teaches at George Washington University Law School, wrote on The Volokh Conspiracy blog last week that Leon’s finding that Smith couldn’t apply because it came down in a precellphone era was “deeply unpersuasive.”

Regardless of what cellphones can do, Kerr said, the NSA was only collecting the basic phone data that was at issue in Smith.Still, Kerr said, an appeal could open the door to a new review by the D.C. Circuit — and potentially the Supreme Court — of how earlier Fourth Amendment cases apply to NSA surveillance programs.

“My view of Judge Leon’s decision is that it’s unpersuasive in its reasoning,” Kerr wrote, “but that it starts a conversation that might lead to some very interesting places.”

Contact Zoe Tillman at ztillman@alm.com. Mike Scarcella contributed.