A federal judge blocked the Trump administration from ending multiple immigration programs that will ultimately impact the legal statuses and livelihoods of hundreds of thousands of immigrants from Ukraine, Afghanistan and Latin America.

The Trump administration’s moves had effectively left those immigrants here under humanitarian parole stranded. Within days of President Donald Trump taking office, officials announced they would be terminating those programs, putting immigrants on the clock to find another way to stay legally, with other avenues of immigration relief also cut off.

Those long-lasting suspensions would mean that as people’s statuses expired, they would effectively be left with two choices: losing their legal status and living in the United States as an undocumented immigrant, or leaving the country.

District of Massachusetts Judge Indira Talwani issued two rulings Wednesday evening in the class-action lawsuit, ordering the government to restart processing applications for those parolees renewing their status.

Talwani wrote that it’s not in the public interest to “manufacture a circumstance in which hundreds of thousands of individuals will, over the course of several months, become unlawfully present in the country, such that these individuals cannot legally work in their communities or provide for themselves and their families.”

“What the Trump administration was trying to do was close the doors and then also close all the windows. And Judge Talwani said, that’s not right,” said Esther Sung, legal director at Justice Action Center, one of the organizations representing plaintiffs in court.

The Department of Homeland Security didn’t reply to a request for comment about the rulings or whether it intends to appeal.

Talwani noted that under law, deciding if people should remain in the country on parole must be made on a case-by-case basis — not as a group.

Talwani granted class certification to immigrants sponsored by U.S. citizens or permanent residents under the Uniting for Ukraine program for Ukrainians fleeing the war with Russia; Operation Allies Welcome for Afghans who assisted the US military; and others.

Anastasiia Vorobel came to Massachusetts in 2022 through the Uniting for Ukraine program, and has parole through October 2026.

Vorobel remembers the day the program was paused days after Trump’s inauguration in January,

“I cried probably eight hours. I couldn’t even concentrate on my work — I went through a lot. I lost two cousins during the war. I left a lot of parts of the family, and you know, so it’s just like something that in a minute broke me down,” she said.

Vorobel feared being deported and wanted to stay home and worried about her daughter going to school.

Vorobel remembers the explosions that used to rock her home in Ukraine and fleeing to underground spots for safety. “You cannot have a future,” she said. Her mom and dad remain in Ukraine, fighting in the Air Force and as a military doctor.

Today, she has hope.

“The first feeling is that probably we’re going survive here,” she said.

Talwani said the government’s so-called “pause” was now in place more than three months, and she considered it in effect an “indefinite suspension.” She called the harm is “a significant magnitude.”

Talwani previously ruled the Department of Homeland Security couldn’t terminate the legal statuses of more than half a million Cubans, Haitians, Nicaraguans and Venezuelans in the so-called “CHNV program” in mid-April.

The government appealed that decision to the First Circuit Court of Appeals, which upheld Talwani’s decision. The case is now pending before the Supreme Court.

Talwani’s order Wednesday will also restart processing applications for other immigration statuses from parolees that have languished for months.

Talwani’s Wednesday order also allows beneficiaries of Military Parole-in-Place to have their applications and applications for renewal adjudicated. That’s a program that allows the foreign national spouses, parents and children of U.S. military personnel to remain in the United States legally and work without possibility of deportation. The judge wrote it’s not in the public interest for enlisted individuals and those serving with the U.S. military to “face family separation, particularly where some of these individuals joined the military in part to help their loved ones obtain lawful status.”

At least 875,000 immigrants are covered under the massive case. It was brought by eight parolees, all of whom were already in the country when the Trump administration announced it was ending the programs, as well as the American citizens who sponsored them. None used their real names out of concern for deportation and retribution.

One Massachusetts-based plaintiff, Svitlana Doe, came to the United States in November with her husband and young son using the Uniting for Ukraine program. She applied for an additional immigration status called Temporary Protected Status earlier this year, but the application was “indefinitely stalled” under Trump administration changes.

Another plaintiff, Omar Doe, served alongside the U.S. military in Afghanistan for more than 18 years before being evacuated by the military following the country’s fall to the Taliban.