Haitians in Miami protest for continued TPS protections. Photo: Joe Raedle/Getty Images

A federal judge on Wednesday blocked the Trump administration’s plans to end protections for immigrants from Sudan, Nicaragua, Haiti, and El Salvador.

The decision, which ends the threat of deportation for hundreds of thousands of people living and working in the U.S., came after a class action lawsuit from recipients of Temporary Protected Status, or TPS. In the suit, the immigrants argued that the administration was motivated by racism when it decided to strip them of TPS protections.

The judge agreed. “President Trump harbors an animus against non-white, non-European aliens which influenced his … decision to end the TPS designation,” U.S. District Judge Edward Chen wrote in his decision.

Chen also emphasized the damage that ending TPS would do to recipients, many of whom “have lived, worked, and raised families in the United States.” Those with children who were born in the U.S. would be faced with the impossible choice of “bringing their children with them (and tearing them away from the only country and community they have known) or splitting their families apart.”

The TPS program benefits immigrants from countries made unsafe by natural disaster or war. While previous administrations extended the designation every few years, even after the circumstances abroad improved, the Trump administration has argued that improved conditions in the home countries of TPS recipients should lead to their return. At least, that was the official line.

In addition to taking issue with Trump’s blatant racism, Chen said the administration failed to show any harm resulting from the continuation of the TPS program. Indeed, 17 states filed a brief outlining the financial hit they would take if TPS recipients were deported. Meanwhile, the “beneficiaries and their children indisputably will suffer irreparable harm and great hardship” if the program ends, Chen wrote.

One of those children said she was “so happy” after the decision. “Ever since the TPS terminations were announced, I have been wondering how I can live a normal life if I am about to lose my mom,” 14-year-old Crista Ramos, one of the plaintiffs and the daughter of a TPS recipient, said in a statement.