Human-rights and humanitarian organizations lost a Supreme Court case Monday when the justices upheld a federal law that prohibits U.S. organizations from providing “material support” to designated terrorist groups. Some nonprofit groups had argued that the law prevents them from engaging in peace-building work and jeopardizes aid in conflict zones.

The challenge was brought by the Humanitarian Law Project, a nonprofit organization in California that sought to provide training in conflict resolution to the Kurdistan Workers Party, which the U.S. government considers a terrorist group. A 1996 law that was revised under the Patriot Act made it a crime to provide “material support”—including services, training, expert advice, and personnel—to terrorist groups, even if the work has legal and peaceful goals.

In a 6-3 decision, the justices rejected the charity’s argument that the law violated their First and Fifth Amendment rights. Writing for the majority, Chief Justice John Roberts said that the government’s definition of “material support” was not unconstitutionally vague and did not deprive groups of their rights to freedom of speech and association.

But Judge Roberts also said that the ruling does not resolve all potential issues surrounding the material-support law. “We do not, however, address the resolution of more difficult cases that may arise under the statute in the future,” he said.

Fear of Prosecution

Many other charities had filed “friend of the court” briefs in support of the Humanitarian Law Project’s challenge, including the Carter Center, Human Rights Watch, the Kroc Institute for International Peace Studies at Notre Dame University, and Operation USA.

People who work with international-aid and human-rights groups said the ruling could cause some groups to avoid working in areas where there are terrorist elements, or providing certain kinds of assistance, for fear of being prosecuted or designated as supporters of terrorism by the U.S. government.

“The decision will have the effect of decreasing the amount of assistance that’s provided,” said Ahilan Arulanantham, director of immigrants’ rights and national security at the ACLU of Southern California.

While working as a volunteer in Sri Lanka after the 2004 Indian Ocean tsunamis, Mr. Arulanantham said he witnessed the climate of fear in which many aid groups operate. Relief groups are risk averse, he said, and they may choose not to provide assistance after natural disasters or violence out of concern for coming under government scrutiny.

Former President Jimmy Carter, founder of the Carter Center, said his group was grappling with just that concern. “The vague language of the law leaves us wondering if we will be prosecuted for our work to promote peace and freedom,” President Carter said in a statement.

Others sympathetic to the charities’ case said they were also worried that the decision further blurred the distinction between providing support to a terrorist group and being a member of it. “The line between support and mere membership will be incredibly thin going forward,” said Steven Vladeck, a professor at the Washington College of Law at American University, in a statement.

The Secretary of State does have authority to grant exemptions to certain groups under the material-support provision, and people who work with charities said they were hopeful the State Department would do so in a way that would encourage peace-building work.

To fight terrorism, “that type of training would actually be something that we would want to encourage rather than criminalizing,” said Sharon Bradford Franklin, senior counsel at the Constitution Project, which joined the Humanitarian Law Project in challenging the material support law.