The Supreme Court ruled on Thursday that the National Institutes of Health can pause almost $800 million in funding for hundreds of research grants, a decision that was seen as a setback to the research community.

But the court also left in place a lower court ruling that the grants were improperly terminated. And the legal back-and-forth continues to create uncertainty for many scientists.

Michael Paasche-Orlow, vice chair for research in the Tufts Medical Center’s Department of Medicine, says even if researchers get funding restored, it’s hard to restart research. Science, he says, is a delicate ecosystem.

“It ends up being really easy to break, unfortunately,” Paasche-Orlow said. “You can’t just put these projects on hold and think that you can get back to it later.”

When a U.S. District Court judge in Boston ruled in June that the NIH’s terminations of roughly 800 research grants were arbitrary and capricious, the judge ordered the NIH to start paying those researchers again. Those grants had been canceled because they focused on topics like diversity, transgender issues, health equity and other areas of research out of line with the Trump administration’s priorities.

The NIH did start funding some of those grants again after that ruling.

But the Supreme Court said Thursday that as an appeal from the Trump administration moves forward, the government can put those payments on pause. The justices said the plaintiffs had filed their suit in the wrong court.

The plaintiffs include the American Public Health Association, the union United Auto Workers (UAW) and 22 states — including Massachusetts.

Attorney General Andrea Campbell of Massachusetts said Thursday that the ruling was “wrong and deeply disappointing.”

“Even though the Court did not dispute that the Trump Administration’s decision to cut critical medical and public health research is illegal, they ordered the recipients of that funding – hospitals, researchers, and the state – to jump through more hoops to get it back,” she wrote in a statement. “Even if accountability is delayed, we won’t stop fighting to protect this funding, our residents, and our rule of law.”

Jessie Rossman of the ACLU, who is representing the plaintiffs, called it a “significant setback for public health.” But she pointed to two pieces of the court’s decision that gave her hope.

The first thing, she said, is that they’re still going to fight in court to get the grants restored. And secondly, she noted the Supreme Court let stand the lower court’s ruling the Trump administration’s justification for terminating the grants was unlawful.

“And what that means is that the NIH cannot terminate any research studies based on those unlawful directives, even after this decision,” Rossman said.

Beyond the current grants, scientists like Tufts’ Paasche-Orlow say the overall outlook for research funding under the current administration looks bleak.

“The broader picture is that the prospect for funding in the next couple of years ... looks like it may be so competitive that, really, most people won’t survive a funding environment of only the top 3% or 4% of submissions could be funded,” he said.

Paasche-Orlow and his colleagues were four years into a five-year grant that was terminated. But he said it’s not his own work he’s worried about.

“I’m old enough. I’m established enough — you know, I’ll make it through,” he said. “But I have mentees who’ve had their funding cut. They’re at a very sensitive time in their career development. The investment that society has already put into them may be completely squandered, let alone that it will ruin their whole career path.”

Dougie Zubizarreta is pursuing a PhD at the Harvard TH Chan School of Public Health. His work had focused on mental health inequities for LGBTQ people — but the lab where he was working had a grant terminated, and then he didn’t get a different grant to support his dissertation. So he’s abandoning that focus of research.

“That work will not continue because it’s not fundable,” Zubizarreta said. “And that’s something that I know a lot of people are working on right now is sort of how to repackage ourselves and make ourselves palatable to the administration.”

He’s shifting gears to focus on mental health more broadly.

“It will require some rethinking in terms of how to do equity work, essentially, in a climate where equity is not a focus — which is a boat that many of us in public health are in,” Zubizarreta said.

The Department of Health and Human Services has not responded to a request for a comment.

For now, the legal battle over whether the Trump administration has the authority to terminate grants it doesn’t like is ongoing, and is moving back to the lower courts.