A federal judge has ruled that the Trump administration can’t end the Biden-era program that allowed migrants from certain countries to legally enter the U.S.

The Miami Herald reported that more than half a million Cubans and other nationalities, including Haitians, Nicaraguans, and Venezuelans, were allowed entry into the United States under the humanitarian parole program of then-President Joe Biden.

Judge Indira Telwani of the U.S. District Court of Massachusetts said that paroled migrants could stay in the U.S. as they pursue immigration benefits.

Talwani’s decision means that Secretary of Homeland Security Kristi Noem can’t revoke the migrants’ parole status in accordance with an administration plan for ending the program on April 24th.

Talwani wrote, in a 41-page order filed at Boston federal court, that while [Trump Administration officials] were correct in that the Secretary’s discretion was broad, they concluded that the Secretary’s actions were wholly shielded against judicial review.

Talwani said that, while her role reviewing the DHS revocation order was “limited,” it gave her the authority to stop the “termination” by the secretary of parole because “it revokes without case-by-case review previously granted paroles and work authorizations to individuals currently in the United States.”

The New York Times reported that the administration ended the program that allowed Cubans, Haitians, Nicaraguans, and Venezuelans to quickly obtain work authorization in the U.S. if they had passed a security check and had a sponsor.

The migrants could stay up to two years, and this period can be extended.

This order affects approximately 532,000 immigrants from four countries who have come to the United States between October 2022 and now.

The Times reported that Talwani’s ruling would force migrants to “choose between two harmful options: either continue following the laws and leave the country themselves, or wait for removal proceedings.”

The judge said that she would stay the DHS decision from last month, which ended the legal status for 532,000 people who came to the United States through the program.

DHS announced in a Federal Register announcement that the temporary legal status of those from these four countries will expire on April 24. DHS’s notice was a response to President Donald Trump’s goal of ending legal pathways for people who are illegally in the U.S.