A group of nearly two dozen Muslim U.S. citizens won a major victory in federal court on Wednesday in their suit against the FBI and other federal agencies over use of the terror watchlist, even as it remained unclear what exactly the consequences of the ruling would be.

The decision from U.S. District Judge Anthony Trenga in the Eastern District of Virginia granted summary judgment to the plaintiffs, who sued with the help of a leading Muslim civil rights group, the Council on American-Islamic Relations (CAIR). Trenga found that the government's list of more than 1 million people identified as “known or suspected terrorists" was unconstitutional.

The watchlist is disseminated to a variety of governmental departments, foreign governments and police agencies. Among the defendants named in the lawsuit were the heads of the Terrorist Screening Center, the FBI, the National Counterterrorism Center, the TSA, and CBP.

FOX NEWS EXCLUSIVE: TRUMP CENSUS BUREAU CUTS PARTNERSHIP WITH CAIR, AFTER REPORTS OF ORG'S PAST LINKS TO HAMAS

Although the plaintiffs in the case had not received any official notice they were on a watchlist, they said they had "inferred" they were on it because they were "routinely subjected to additional screening when they fly on a commercial airplane and when they enter the United States at a land border or port," the judge wrote.

Some of the plaintiffs said they had previously been denied boarding on flights, though none maintained they were currently on a no-fly list.

In response, the government argued that the plaintiffs lacked standing because they could not show they would suffer immediate injury, and because they had not exhausted administrative remedies for their complaints.

But because the government did not dispute the factual contention that at least five plaintiffs were regularly subjected to extra screening, Trenga said the case was ripe for resolution by summary judgment. That procedure allows courts to quickly dispense of cases where there is no significant factual dispute that would require a lengthy trial, and where the plaintiff is entitled to a judgment as a matter of law.

“The court concludes that the risk of erroneous deprivation of plaintiffs’ travel-related and reputational liberty interests is high, and the currently existing procedural safeguards are not sufficient to address that risk,” Trenga wrote.

"Innocent people should be beyond the reach of the watchlist system."

— Gadeir Abbas, lawyer for the plaintiffs

The judge said he was seeking additional legal briefs before deciding what remedy to impose, and wanted both sides to explain "what kind of remedy can be fashioned to adequately protect a citizen’s constitutional rights while not unduly compromising public safety or national security.”

The plaintiffs said that they were wrongly placed on the list, and that the government’s process for adding names is overbroad and riddled with errors.

The FBI declined comment on the ruling.

In court, the FBI’s lawyers argued that the difficulties suffered by the plaintiffs pale in comparison to the government’s interests in combating terrorism.

Gadeir Abbas, a lawyer for the plaintiffs, called the ruling an unequivocal victory. He said he will be asking the judge to severely curtail how the government compiles and uses its list.

“Innocent people should be beyond the reach of the watchlist system,” Abbas said. “We think that’s what the Constitution requires.”

Abbas said that while there has been significant litigation over the no-fly list, which forced the government to improve the process for people seeking to clear their names, Trenga’s ruling is the first to broadly attack the government’s use of the watchlist.

CAIR Executive Director Nihad Awad said in a statement that the organization's “legal team has finally brought an end to the secretive watchlist, which is effectively a Muslim registry created in the wake of the widespread Islamophobia of the early 2000s.”

Trenga also wrote in his 31-page ruling that the case “presents unsettled issues.”

SAN FRANCISCO BRANDS NRA A 'TERRORIST' ORGANIZATION, AS TRUMP SUGGESTS GIVING THAT LABEL TO ANTIFA

Ultimately, Trenga ruled that the travel difficulties faced by plaintiffs — who say they were handcuffed at border crossings and frequently subjected to invasive secondary searches at airports — are significant, and that they have a right to due process when their constitutional rights are infringed.

He also said the concerns about erroneous placement on the list are legitimate. “There is no evidence, or contention, that any of these plaintiffs satisfy the definition of a ’known terrorist,” Trenga wrote. And the alternate standard for placement — that of a “suspected terrorist” — can easily be triggered by innocent conduct that is misconstrued, he said.

The watchlist, also known as the Terrorist Screening Database, is maintained by the FBI and shared with a variety of federal agencies. Customs officers have access to the list to check people coming into the country at border crossings, and aviation officials use the database to help form the no-fly list, which is a much smaller subset of the broader watchlist.

The watchlist has grown significantly over the years. As of June 2017, some 1.16 million people were included on the watchlist, according to government documents filed in the lawsuit. In 2013, the number was only 680,000. The vast majority are foreigners, but according to the government, there were roughly 4,600 U.S. citizens and lawful permanent residents on the list as of 2017.

Abbas argued at a court hearing earlier this year that the intrusions imposed on those listed are all for naught and that the list is worthless in terms of preventing terrorism. He noted that Omar Mateen, the man who shot and killed 49 people at the Pulse nightclub in Orlando, Fla., in 2016, was at one time on the list but was later removed from it.

Others who have committed terrorist acts have never even been included on the watchlist.

The suit was filed in 2016, and has exposed previously unknown details about the list and how it is disseminated. In particular, government lawyers acknowledged after years of denials that more than 500 private entities are given access to the list. Government lawyers describe those private agencies as “law enforcement adjacent” and include university police forces, and security forces and hospitals, railroads and even animal-welfare organizations.

Abbas said the revelations about the government’s actions have come after years of dismissive responses from government officials who accused CAIR and others of paranoia.

CLICK HERE TO GET THE FOX NEWS APP

Earlier this year, the House of Representatives adopted a proposal from Democratic Minnesota Rep. Ilhan Omar that would force the Trump administration to disclose details about how it shares the watchlist with foreign countries.

Fox News' Ronn Blitzer and The Associated Press contributed to this report.