In a separate case challenging the program, a federal appeals court in New York on Oct. 30 had declined to weigh in on the constitutional issues, saying it would be imprudent to interfere with an orderly transition to a replacement system after Nov. 29.
But on Monday, in a 43-page ruling, Judge Richard J. Leon of the United States District Court for the District of Columbia wrote that the constitutional issues were too important to leave unanswered in the history of the disputed program, which traces back to the aftermath of the Sept. 11 terrorist attacks and came to light in 2013 in leaks by Edward J. Snowden, the former intelligence contractor.