By the Associated Press

A judge on Wednesday struck down a portion of a law giving the government wide powers to regulate the detention, interrogation and prosecution of suspected terrorists, saying it left journalists, scholars and political activists facing the prospect of indefinite detention for exercising First Amendment rights.

U.S. District Judge Katherine Forrest in Manhattan said in a written ruling that a single page of the law has a “chilling impact on First Amendment rights.” She cited testimony by journalists that they feared their association with certain individuals overseas could result in their arrest because a provision of the law subjects to indefinite detention anyone who “substantially” or “directly” provides “support” to forces such as al-Qaida or the Taliban. She said the wording was too vague and encouraged Congress to change it.

“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,” the judge said.

She said the law also gave the government authority to move against individuals who engage in political speech with views that “may be extreme and unpopular as measured against views of an average individual.

“That, however, is precisely what the First Amendment protects,” Forrest wrote.

She called the fears of journalists in particular real and reasonable, citing testimony at a March hearing by Pulitzer Prize-winning journalist Christopher Hedges, who has interviewed al-Qaida members, conversed with members of the Taliban during speaking engagements overseas and reported on 17 groups named on a list prepared by the State Department of known terrorist organizations. He testified that the law has led him to consider altering speeches where members of al-Qaida or the Taliban might be present.

Hedges called Forrest’s ruling “a tremendous step forward for the restoration of due process and the rule of law.”

He said: “Ever since the law has come out, and because the law is so amorphous, the problem is you’re not sure what you can say, what you can do and what context you can have.”

Hedges was among seven individuals and one organization that challenged the law with a January lawsuit. The National Defense Authorization Act was signed into law in December, allowing for the indefinite detention of U.S. citizens suspected of terrorism. Wednesday’s ruling does not affect another part of the law that enables the United States to indefinitely detain members of terrorist organizations, and the judge said the government has other legal authority it can use to detain those who support terrorists.

A message left Wednesday with a spokeswoman for government lawyers was not immediately returned.

Bruce Afran, a lawyer for the plaintiffs, called the ruling a “great victory for free speech.”

“She’s held that the government cannot subject people to indefinite imprisonment for engaging in speech, journalism or advocacy, regardless of how unpopular those ideas might be to some people,” he said.

Read more from The Wall Street Journal: