On a 2004 trip from one U.S. city to another, my son evidently made it onto some kind of terrorist watchlist. Both at the airport from which we departed, and then at the one we left on the way home less than one week later, he was flagged by airline staff and then we both were questioned, briefly, by what I recall were a few official-looking, stern people. Ultimately, my son was deemed not to be a terrorist and was cleared for travel. No harm, no foul — and he had no idea what the fuss was about. He was 5 years old.

That episode was the first thing I thought about Wednesday night when the news broke that a federal judge in Virginia had struck down the government’s main “watchlist” as an undue burden on the constitutional rights of U.S. citizens. I thought about my son, and about how Sen. Edward M. Kennedy famously made it onto the No Fly List around the same time, and about how so many of us way back in 2004 joked about what a “joke” the watchlists were. How incomplete, inaccurate, and rife with bureaucratic miasma and law enforcement excess.

Since the terror attacks of September 11, 2001, thousands of other Americans — non-terrorists, too — have been unfairly placed on these secret lists without a meaningful chance to get off them. They’ve had their travel interrupted, or worse, based on information no one beyond law enforcement has ever seen. In most cases, advocates say, those targeted have been citizens of color, or citizens who practice their Muslim faith, or those who hail from or travel to Middle Eastern countries. In many cases, they’ve been unjustly targeted.

“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,” wrote U.S. District Judge Anthony J. Trenga. His decision this week is a landmark event in the “war on terror” whether or not it ultimately is affirmed on the appeal that surely will follow from the Justice Department. It is a big deal even though Trenga, appointed by George W. Bush, himself raised questions about what possible remedy makes sense here.

We don’t talk or think as much about the “watchlist” as we did all those years ago. The feds don’t stop my son when he travels to and from college. In fact, in the wake of Trenga’s ruling, I am surprised and disappointed that it’s taken this long for the federal courts to recognize the magnitude of the constitutional problems that exist when so much surveillance is done in such secrecy for so long, with insufficient chance given to the accused to defend themselves either before or after they’ve been punished, or “nominated” as potentially dangerous.

There actually are several lists. There is the broader Terrorist Screening Database, which casts a wide net across federal law enforcement agencies. As of June 2017 the list reportedly had at least 1.2 million names on it, including some 4,600 American citizens and legal residents. There’s also the narrower No Fly List, which was deemed constitutionally flawed five years ago in a ruling by a federal judge in Oregon. I assume my son was on the narrower list all those years ago, but who really knows? One of the main problems with the watchlist system is that it’s shrouded in secrecy.

Trenga’s decision Wednesday focuses on the legal failings of the broader database — another reason why the ruling is a historic event — and on what he views as the federal government’s continuing inability to ensure the list’s accuracy and reliability, to the extent that that’s even possible. As is often the case, the judge found that the feds had sabotaged their own arguments in defense of the database by the way they deployed it. No “neutral decision-maker” is in place, for example, to review “nominations” onto the list.

There were 19 plaintiffs in the case, represented by the Council on American-Islamic Relations, and they deserve credit for sticking with their case and their cause all these years. At airports and other ports of entry, these Americans have been hounded and hassled, over and over again, by federal agents. For example, one plaintiff, Anas Elhady, was reentering the United States from Canada by car following a brief trip in 2015, when he was surrounded by Customs and Border Protection officers, handcuffed, and interrogated for 10 hours.

Elhady suffered a medical emergency during that episode and was transferred to and from the hospital in handcuffs. On other occasions when he attempted to cross the border, with all of the paperwork necessary to do so, he was “handcuffed, stripped of his belongings, kept in a cell, and prohibited from contacting his attorney,” Trenga noted in his decision. Other plaintiffs allege similar acts by federal agents. They also allege the government failed or refused to explain why they had made the “list” or why they couldn’t be removed from it. Orwellian is one word for this.

It is likely that Judge Trenga was aided in his understanding of the flaws in the government’s program by journalists and advocates who years ago exposed some of the secret (and often dubious) justifications federal agents used to include people onto the lists. Through three successive administrations, both Republican and Democratic, the feds tried to hide their rationale from the American people, citing national security and the broader need for secrecy in the endless war on terror now entering its second generation.

The Trump administration surely will fight back against Trenga’s ruling and hope they can maneuver the dispute onto the Supreme Court, where they pray an archly conservative majority, eager to defer to the executive branch on matters of counterterrorism, will slap down Trenga and resuscitate the watchlist. Maybe yes and maybe no. Maybe Justice Neil Gorsuch eschews his libertarian leanings and sides with the government or maybe he doesn’t. Maybe Chief Justice John Roberts sticks up for due process or maybe he doesn’t.

It really does feel like 2004, doesn’t it, when another Republican administration counted on another conservative Supreme Court to rubber stamp another victory in the war on terror.

The big case then, Hamdi v. Rumsfeld, centered around whether the government could keep U.S. citizens designated as “enemy combatants” in that war on terror detained indefinitely without due process at the military base at Guantanamo Bay, Cuba. But it generated instead a stinging constitutional defeat for the Bush administration and the unforgettable line from the Republican appointee, Justice Sandra Day O’Connor, who said: “a state of war is not a blank check for the president when it comes to the rights of the nation's citizens.”

The views expressed are the author's own and not necessarily those of the Brennan Center.