A federal judge appointed by President George W. Bush has ruled that the “terrorist watchlist” database compiled by federal agencies and used by the Federal Bureau of Investigation and the Department of Homeland Security violates the rights of American citizens who are on it.

The ruling, first reported by The New York Times, raises questions about the constitutionality of the practice, which was initiated in the wake of the September 11 terrorist attacks.

The Terrorist Screening Database is used both domestically and internationally by law enforcement and other federal agencies and inclusion on the database can have negative consequences — including limiting the ability to travel for citizens whose names are on the list.

The U.S. government has identified more than 1 million people as “known or suspected terrorists” and included them on the watchlist, according to reporting from the Associated Press.

The ruling from U.S. District Judge Anthony Trenga is the culmination of several years of hearings on the complaint, brought to court by roughly two dozen Muslim U.S. citizens with the support of Muslim civil-rights group, the Council on American Islamic Relations.

The methodology the government used to add names to the watchlist was shrouded in secrecy and citizens placed on the list often had no way of knowing how or why they were on it. Indeed, much of the plaintiffs’ lawsuit hinged on the over-broad and error-prone ways in which the list was updated and maintained.

“The vagueness of the standard for inclusion in the TSDB, coupled with the lack of any meaningful restraint on what constitutes grounds for placement on the Watchlist, constitutes, in essence, the absence of any ascertainable standard for inclusion and exclusion, which is precisely what offends the Due Process Clause,” wrote Judge Trenga.

In court, lawyers for the FBI contended that any difficulties the 21 Muslim plaintiffs suffered were outweighed by the government’s need to combat terrorist threats.

Judge Trenga disagreed. Especially concerning for the judge were the potential risks to an individual’s reputation as a result of their inclusion on the watchlist. That’s because the list isn’t just distributed to federal law enforcement agencies, but also finds its way into the hands of more than 18,000 state, local, county, city, university and college and tribal and federal law enforcement agencies, and another 533 private entities. The judge was concerned that mistaken inclusion on the watchlist could have negative implications in interactions with local law enforcement and potential employers or local government services.

“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 CAIR senior litigation attorney Gadeir Abbas. “CAIR will continue its fight until the full scope of the government’s shadowy watchlist activities is disclosed to the American public.”

Federal agencies have consistently expanded the number of names on the watchlist over the years. As of June 2017, 1.16 million people were included on the watchlist, according to government documents filed in the lawsuit and cited by the AP — with roughly 4,600 of those names belonging to U.S. citizens and lawful permanent residents. In 2013, that number was 680,000, according to the AP.

“The fundamental principle of due process is notice and the opportunity to be heard,” said CAIR trial attorney Justin Sadowsky. “Today’s opinion provides that due process guarantee to all Americans affected by the watchlist.”