NEW YORK

- The heated debate over the National Security Agency's bulk collection of millions of Americans' telephone records fell squarely into the courts yesterday, when a federal judge in Manhattan upheld the legality of the program and cited its need in the fight against terrorism a week after another federal judge concluded it was likely not constitutional.

The ruling by U.S. District Judge William H. Pauley III and an opposing view earlier this month by U.S. District Judge Richard Leon in Washington, D.C., sets the stage for federal appeals courts to confront the delicate balance developed when the need to protect national security clashes with civil rights established in the Constitution.

Pauley concluded that the program was a necessary extension of steps taken after the 9/11 terrorist attacks. He said the program lets the government connect fragmented and fleeting communications and "represents the government's counter-punch" to the al-Qaeda terror network's use of technology to operate decentralized and plot international terrorist attacks remotely.

"This blunt tool only works because it collects everything," Pauley said. "The collection is broad, but the scope of counterterrorism investigations is unprecedented."

Pauley's decision contrasts with Leon's grant of a preliminary injunction against the collecting of phone records of two men who had challenged the program. The Washington, D.C., jurist said the program likely violates the U.S. Constitution's ban on unreasonable search. The judge has since stayed the effect of his ruling, pending a government appeal.

Both cases now move to appeals courts for a conflict that some believe will eventually be settled by the Supreme Court.