WASHINGTON -- A day before Congress weighs an amendment to end indefinite military detentions in the U.S., a federal judge Wednesday ruled the law that allows the practice unconstitutional.

Saying the measure has "chilling impact on First Amendment rights," U.S. District Judge Katherine Forrest, of New York's Eastern District, found that a group of reporters and activists who brought the lawsuit had no way of knowing whether they could be subjected to it. That makes it an unconstitutional infringement on the First Amendment's free speech right and the Fifth Amendment's right to due process, Forrest said in a written opinion.

The lead plaintiffs -- Pulitzer Prize winner Chris Hedges of the Nation Institute and Tangerine Bolen, who runs the website RevolutionTruth -- argued that they conceivably could be grabbed under the law because they deal with sources that U.S. authorities may deem to fall under the law, Section 1021 of the 2012 National Defense Authorization Act.

The law defines the suspects who can be detained as a "person who was a part of or substantially supported al-Qaeda, the Taliban, or associated forces."

Forrest found the language too vague, and repeatedly tried to get government attorneys to say that the reporters' fears were unfounded. The lawyers declined.

"At the hearing on this motion, the government was unwilling or unable to state that these plaintiffs would not be subject to indefinite detention under [section] 1021," Forrest wrote. "Plaintiffs are therefore at risk of detention, of losing their liberty, potentially for many years.

"An individual could run the risk of substantially supporting or directly supporting an associated force without even being aware that he or she was doing so," Forrest wrote. "In the face of what could be indeterminate military detention, due process requires more."

"We dealt a pretty big blow to two branches of Congress and President Obama," Bolen told The Huffington Post. Bolen got involved in the lawsuit because she worked extensively on the Wikileaks and Bradley Manning cases, and used her website to expose where the war on terror has gone tragically wrong, including interviewing Iraqis and Afghans with damning tales to tell.

"Given that I engage in those two activities and I have an entire team around the world, I really felt that under the vague language of the NDAA, someone like me could easily get in trouble," Bolen said.

"If I start showing that we're behaving in such an egregious manner in this country in our alleged war on terror, and I become a thorn in the side of the U.S government in fighting for our rights -- the phrase material support, I'm talking to, quote, alleged terrorists or people around the world who may be questionable -- just by talking to them and interviewing them on a platform, am I providing them material support?" Bolen said. "That was my fear."

The author and activist Naomi Wolf said watching the judge question administration lawyers repeatedly on the issue of who might be detained under the law -- and the lawyers not answering -- was downright chilling. To have the judge find that state of affairs unconstitutional was a profound relief, Wolf said in an interview.

"To hear those words -- it's so true, it's so obvious -- it puts in glaring relief the hideousness, the unconstitutionality, the darkness of this legislative efffort and others like it," Wolf said. "She is so completely, obviously right. It's nothing short of treason to have put forward legislation like this, let alone to have had most of the people who represent us and our president sign off on this clearly, obviously criminally unconstitutional -- unconstitutional is inadequate. It's anti-constitutional. It's dictatorial.

"I'm so happy as a mother. It's so profound. All of us were put in danger by this law."

The White House had no comment on the ruling Wednesday night.

Reps. Adam Smith (D-Wash.) and Justin Amash (R-Mich.) are offering an amendment on Thursday to the 2013 Defense Authorization Act that would end the law. Amash sent an appeal to fellow lawmakers soon after the ruling, asking them to pass it.

"The amendment I’m offering with Rep. Adam Smith is the ONLY amendment that ensures that persons arrested on U.S. soil aren’t detained indefinitely without charge or trial," Amash wrote. "Voting against the Smith-Amash amendment allows the government to retain the power to detain persons, picked up in the U.S., for life, on the suspicion that they 'substantially supported' forces 'associated' with our enemies."

"If our constituents haven’t sent a clear enough message, tonight’s ruling surely does: Congress must act now to guarantee the constitutional right to a charge and a trial," Amash wrote.

The progressive group Demand Progress was among those directing voters to contact their elected representives about the law, using an online petition and a new Facebook tool.

The government has 60 days to decide whether to appeal.

Michael McAuliff covers politics and Congress for The Huffington Post. Talk to him on Facebook.