A federal judge on Wednesday ruled that the government's terror watchlist violates the civil rights of Americans placed on it, opening the door for a major piece of legislation from the global war on terror being overturned.

"This is a really important ruling, long overdue," said Jameel Jaffer, director of the Knight First Amendment Institute at Columbia University. "The watchlist is overbroad, opaque, and arbitrary—a civil liberties train wreck."

The ruling (pdf) stemmed from a lawsuit brought by 19 Americans on the list represented by the Council on American-Islamic Relations (CAIR).

"Today's opinion is a victory for the more than one hundred American Muslims we represent and for the thousands of American Muslims who are currently stigmatized by the watchlist," CAIR national litigation director Lena Masri said in a statment.

The New York Times broke the story Wednesday evening:

Being on the watchlist can restrict people from traveling or entering the country, subject them to greater scrutiny at airports and by the police, and deny them government benefits and contracts. In a 32-page opinion, Judge Anthony J. Trenga of United States District Court for the Eastern District of Virginia said the standard for inclusion in the database was too vague. "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," Judge Trenga wrote.

"About time somebody did something about this," tweeted journalist Dan Froomkin.

The watchlist is part of a system of abuses and unlawful overreach that rose out of the so-called "War on Terror," The Intercept's Glenn Greenwald said on Twitter.

Many of the early domestic liberty assaults from the War on Terror - including the Terror Watch List & No-Fly list (aimed, needless to say, overwhelmingly at US Muslims) - were constitutional atrocities from the start. Good to see courts finally acting: https://t.co/b2JnPK7ymr — Glenn Greenwald (@ggreenwald) September 5, 2019

The ruling was welcomed by the ACLU's National Security Project director Hina Shamsi.

"This important decision is exactly right," said Shamsi. "The government watchlist stigmatizes people as terrorism suspects based on a vague and error-prone standard and secret evidence, and causes real harms. It violates due process."

Shamsi added that the next steps must address how to repair the damage done by years of the watchlist.

"There must be a fair and meaningful process for people to challenge wrongful placement on the watchlist and clear their names," Shamsi said.

The fight will go on, CAIR senior litigation attorney Gadeir Abbas said in a statment.

"Every step of this case revealed new layers of government secrets, including that the government shares the watchlist with private companies and more than sixty foreign countries," said Abbas. "CAIR will continue its fight until the full scope of the government’s shadowy watchlist activities is disclosed to the American public."