The present case involves a broad watchlist, called the Terrorist Screening Database. It is maintained by the F.B.I., but other agencies can nominate people for inclusion on the list based on intelligence that may never be shared with them.

A subset of the people on the watchlist are also put on the more restrictive No Fly List, which bars them from boarding planes in the United States or flying through American airspace. In 2014, a federal judge in Oregon ruled that the government’s use of the No Fly List to bar Americans from boarding planes was unconstitutional, requiring the Department of Homeland Security to overhaul its Traveler Redress Inquiry Program procedures.

Later that same year, Judge Trenga struck down a use of the No Fly List to keep a particular American, Gulet Mohamed, from boarding a flight home, effectively exiling him. The judge’s ruling about the broader watchlist on Wednesday built on his earlier opinion, which he quoted from extensively.

Judge Trenga noted that most of the plaintiffs in the current case did not claim to be on the more restrictive No Fly List, but said their inclusion on the broader Terrorist Screening Database — which he referred to by the initials TSDB — raised similar issues because of the burden of going through the delays and humiliations of enhanced screenings that led some plaintiffs to avoid traveling.

“While inclusion in the TSDB does not constitute a total ban on international travel in the same way that inclusion on the No Fly List does,” he wrote, “the wide-ranging consequences of an individual’s watchlist status render it more closely analogous to the No Fly List than to the types of regulations that courts have found to be reasonable regulations that still facilitated access and use of means of travel.”

He also noted that the terrorism watchlist was used for screening government contractors and was shared with state and local law enforcement agencies, which increases their risk of “being surrounded by police, handcuffed in front of their families and detained for many hours.”

Files released by the F.B.I. in 2011 under the Freedom of Information Act showed that the F.B.I. was permitted to include people on the watchlist even if they had been acquitted of terrorism-related offenses or the charges are dropped.

Judge Trenga was appointed in 2008 by President George W. Bush.