A federal judge ruled Wednesday that a government database of more than one million people identified as “known or suspected terrorists,” violates the constitutional rights of U.S. citizens who were added to the list by denying them due process.

Almost two dozen Muslim American citizens who were placed on a watchlist, known as the Terrorist Screening Database, filed suit along with the Council on American-Islamic Relations against the government saying they were wrongly included in the database and that the process for adding names is overbroad and riddled with errors.

Many on the list, which is maintained by the FBI and shared with a variety of federal agencies, said they were subjected to frequent and sometimes invasive screenings while traveling which have led to “adverse experiences and consequences,” including being handcuffed at border crossings.

U.S. District Judge Anthony Trenga ruled that the travel difficulties faced by plaintiffs who were on the list are significant and that they have a right to due process when their constitutional rights are infringed.

"The general right of free movement is a long-recognized, fundamental liberty," he wrote. "Inclusion in the TSDB accordingly imposes a substantial burden on Plaintiff's exercise of their rights to international travel and domestic air travel" which he adds is a "deprivation of liberty interests."

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.

Trenga added that “an individual’s placement into the [watch list] does not require any evidence that the person engaged in criminal activity, committed a crime, or will commit a crime in the future,” and “individuals who have been acquitted of a terrorism-related crime may still be listed.”

The database was put together in the aftermath of the 9/11 attacks and in many cases added American citizens with little oversight and secretive criteria.

As of 2017, 1.2 million people are listed in the database, of which 4,600 are American citizens or lawful permanent residents, according to the ruling.

The FBI declined to comment on the ruling Wednesday, but in court government 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 a victory. He said he will be asking the judge to severely curtail how the government compiles and uses its list.