A federal judge ruled today that the NSA's bulk telephone metadata spying program is "lawful" and represents the nation's "counter-punch" to terrorism, a decision at odds with a different federal judge who two weeks ago said it infringed the Constitution.

"The natural tension between protecting the nation and preserving civil liberty is squarely presented by the Government's bulk telephone metadata collection program. Edward Snowden's unauthorized disclosure of Foreign Intelligence Surveillance Court ("FISC") orders has provoked a public debate and this litigation. While robust discussions are underway across the nation, in Congress, and at the White Housed, the question for this Court is whether the Government's bulky telephony metadata program is lawful. This Court finds it is," U.S. District Judge William Pauley of New York ruled. (.pdf)

Pauley, a President Bill Clinton appointee, said the spying was a reasonable, "vital tool" to combat terrorism and is less intrusive than the data people "voluntarily surrender" to "trans-national corporations."

The decision comes as President Barack Obama was mulling overhauling the program to satisfy public concerns over the stockpiling of American's calling records. What's more, the ruling contradicts another federal judge, who ruled earlier this month that America's founding fathers would be "aghast" at the program, which has been authorized by Congress and by a secret tribunal known as the Foreign Intelligence Surveillance Court.

The suit (.pdf) was brought by the American Civil Liberties Union in June, days after the Guardian published a secret FISC opinion authorizing the bulk collection, and among other things claimed the program breached Americans' rights to be free from warrantless searches and seizures. The civil rights group labeled the spying as "one of the largest surveillance efforts ever launched by a democratic government."

The issue is almost certainly going to reach the Supreme Court. But it isn’t likely to get there for a year or more as it meanders through the legal system. So unless Obama alters course, the collection program is likely to continue unabated.

Justice Department spokesman Peter Carr said the government was "pleased with the decision."

The ACLU said it would appeal to the 2nd U.S. Circuit Court of Appeals in New York.

"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," said Jameel Jaffer, the ACLU's deputy legal director.

Judge Pauley refused to block the program and dismissed the case at the government's request.

Two weeks ago, when a different federal judge ruled against the bulk collection program, many suggested it was time to grant amnesty to Snowden for exposing the spying. U.S. District Judge Richard Leon in Washington, D.C., found that "such a program infringes on 'that degree of privacy' that the Founders enshrined in the Fourth Amendment. Indeed, I have little doubt that the author of our Constitution, James Madison, who cautioned us to be aware 'the abridgment of freedom of the people by gradual and silent encroachments by those in power,' would be aghast."

Leon stayed enforcement of his ruling, pending appeal.

Today's decision, however, throws a monkey wrench into any bid by Snowden, who is in exile in Moscow, to obtain amnesty from the espionage charges he is facing in the United States.

Since at least 2006, the secret Foreign Intelligence Surveillance Court has been assigning orders, at the NSA's request, demanding the nation's telecom providers hand over bulk telephone metadata without probable-cause warrants. That data includes phone numbers of both parties involved in all calls, the international mobile subscriber identity number for mobile callers, calling card numbers used in the call, and the time and duration of the calls.

The NSA's telephony database is said to have more than 1 trillion records. Judge Pauley said the program was necessary to protect America.

No doubt, the bulk telephony metadata collection program vacuums up information about virtually every telephone call to, from, or within the United States. That is by design, as it allows the NSA to detect relationships so attenuated and ephemeral they would otherwise escape notice. as the September attacks demonstrate, the cost of missing such a thread can be horrific. Technology allowed al-Qaeda to operate decentralized and plot international terrorist attacks remotely. The bulk telephony metadata collection program represents the Government's counter-punch: connecting fragmented and fleeting communications to re-construct and eliminate al-Qaeda's terror network.

Judge Pauley said evidence showed the program disrupted a plot to bomb the New York subway and the New York Stock Exchange and a Danish newspaper, among other attacks. Judge Leon, however, found two weeks ago that the program did not help the government battle terrorism.

What's more, both judges expressed opposing views on a key 1979 Supreme Court ruling that the Obama administration and the secret Foreign Intelligence Surveillance Court have cited to justify the spying program.

The clandestine U.S. court has been authorizing the collection based on the legal fallout of a 1976 Baltimore purse snatching, in which the authorities recorded, without warrants, the numbers called from the assailant's phone. The robber was calling and threatening his victim, and the authorities had a suspect in mind. The Supreme Court ruled in 1979 that defendant Michael Smith had no expectation of privacy in the phone numbers he called.

Judge Leon, a President George W. Bush appointee, when ruling against the program earlier this month, said that precedent no longer applies in the digital age.

"Indeed, the question in this case can more properly be styled as follows: When do present-day circumstances — the evolutions in the Government’s surveillance capabilities, citizens’ phone habits, and the relationship between the NSA and telecom companies — become so thoroughly unlike those considered by the Supreme Court thirty-four years ago that a precedent like Smith does not apply. The answer unfortunately for the Government, is now," Leon wrote.

But today, Judge Pauley said the precedent in the purse snatching still stands.

"Inferior courts," he wrote, "are bound by that precedent."