By Michael S. Schmidt and Adam Liptak
New York Times
December 28, 2013

WASHINGTON — A federal judge in New York ruled on Friday that the National Security Agency’s program that is systematically keeping phone records of all Americans is lawful, creating a conflict among lower courts and increasing the likelihood that the issue will be resolved by the Supreme Court.

In the ruling, Judge William Pauley, of the US District Court for the Southern District of New York, granted a motion filed by the federal government to dismiss a challenge to the program brought by the American Civil Liberties Union, which had tried to halt the program.

Pauley said protections under the Fourth Amendment do not apply to records held by third parties, like phone companies.

“This blunt tool only works because it collects everything,” Pauley said in the ruling. “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 telephony metadata program is lawful. This court finds it is.”

A spokesman for the Justice Department said, “We are pleased the court found the NSA’s bulk telephony metadata collection program to be lawful.” He declined to comment further.

Jameel Jaffer, the ACLU deputy legal director, said the group intended to appeal. “We are extremely disappointed with this decision, which misinterprets the relevant statutes, understates the privacy implications of the government’s surveillance, and misapplies a narrow and outdated precedent to read away core constitutional protections,” he said.

The ruling comes nearly two weeks after Judge Richard J. Leon of US District Court for the District of Columbia said the program most likely violated the Fourth Amendment.

As part of the ruling, Leon ordered the government to stop collecting data on two plaintiffs who brought the case against the government.

In his ruling, Leon said the program “infringes on ‘that degree of privacy’ that the founders enshrined in the Fourth Amendment,” which prohibits unreasonable searches and seizures.

While Leon ordered the government to stop collecting data on the two plaintiffs, he stayed the ruling, giving the government time to appeal the decision.

Pauley, whose courtroom is just blocks from where the World Trade Center towers stood, endorsed arguments made in recent months by senior government officials — including former FBI director Robert S. Mueller III — that the program might have caught the Sept. 11, 2001, hijackers had it been in place before the attacks.

In the months before 9/11, the NSA had intercepted several calls made to an Al Qaeda safe house in Yemen.

But because the NSA was not tracking all phone calls made from the United States, it did not detect that the calls were coming from one of the hijackers who was living in San Diego.

“Telephony metadata would have furnished the missing information and might have permitted the NSA to notify the Federal Bureau of Investigation of the fact that Al-Mihdhar was calling the Yemeni safe house from inside the United States,” Pauley said, referring to the hijacker, Khalid Al-Mihdhar.

Pauley said that the “government learned from its mistake and adapted to confront a new enemy: a terror network capable of orchestrating attacks across the world.”

The government, he added, “launched a number of countermeasures, including a bulk telephony metadata collection program — a wide net that could find and isolate gossamer contacts among suspected terrorists in an ocean of seemingly disconnected data.”

The main dispute between Pauley and Leon was over how to interpret a 1979 Supreme Court decision, Smith v. Maryland, in which the court said that a robbery suspect had no reasonable expectation that his right to privacy extended to the numbers dialed from his phone.

“Smith’s bedrock holding is that an individual has no legitimate expectation of privacy in information provided to third parties,” Pauley wrote.

But Leon said in his ruling that advances in technology and suggestions in concurring opinions in later Supreme Court decisions had undermined Smith. The government’s ability to construct a mosaic of information from countless records, he said, called for a new analysis of how to apply the Fourth Amendment’s prohibition of unreasonable government searches.

Pauley disagreed. “The collection of breathtaking amounts of information unprotected by the Fourth Amendment does not transform that sweep into a Fourth Amendment search,” he wrote.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.