A federal court in San Francisco has suspended the Trump administration’s termination of temporary protected status for hundreds of thousands of immigrant refugees living in the United States.

On October 3, U.S. District Court Judge Edward Chen issued a preliminary injunction that prohibits the administration from stripping temporary protected status from immigrants who fled wars and natural disasters in El Salvador, Nicaragua, Haiti, and Sudan between 1997 and 2010 to seek refuge in the U.S. The injunction will allow these immigrants to remain in the country legally and with work authorization until the lawsuit challenging the administration’s temporary protected status terminations is resolved in the courts.

With the government almost certain to appeal the decision, and with the liberal 9th Circuit Court of Appeals likely to uphold it, this ultimately leaves the fate of temporary protected status in the hands of the Supreme Court. The futures of temporary protected status-holders and their families thus hang on the outcome of the confirmation battle over Judge Brett Kavanaugh, or a replacement nominee. For the time being, however, this ruling affords them a temporary reprieve.

Congress created the temporary protected status designation in 1990 to extend safe haven to foreign nationals fleeing humanitarian catastrophes. Under the law, the secretary of homeland security periodically reviews the conditions in the countries to which the government has extended temporary protected status designations, and determines whether to extend or terminate that status. Prior administrations have repeatedly extended the temporary protected status designations for El Salvador, Nicaragua, Haiti, and Sudan, deeming the conditions in those countries unsafe for protected status-holders to return to them. The Trump administration, however, has elected to terminate temporary protected status for all four countries.

The court ruled that there is ample evidence that the administration’s termination decisions were motivated by President Donald Trump’s racism. Trump has famously referred to Mexican immigrants as “rapists;” called for a “shutdown of Muslims entering the United States”; claimed that 15,000 recent Haitian immigrants “all have AIDS”; contended that Nigerian immigrants would never “go back to their huts”; and, in a discussion about temporary protected status, wondered why the U.S. was admitting immigrants from “shithole countries” instead of places like Norway. Chen pointed to these examples as “evidence that President Trump harbors an animus against non-white, non-European aliens.”

Trump’s openly displayed racial prejudices, the court concluded, may have influenced former Acting Secretary of Homeland Security Elaine Duke and current Secretary Kirstjen Nielsen to terminate temporary protected status for the four poor, nonwhite countries regardless of whether the conditions in those countries justified it. Following their lead, agency staffers appear to have suppressed, obscured, and cherry-picked data in their reviews of country conditions in order to conform to this “pre-ordained result desired by the White House.”

In the most flagrant example of this dynamic, cited in the judge’s ruling, U.S. Citizenship and Immigration Services submitted a memo to Duke in August 2017, based in part on State Department assessments, asserting that conditions in Sudan — namely, civil war — remained unsafe and that “termination does not appear to be warranted.” It noted that the State Department recommended an 18-month extension.

Then, a week and a half later, USCIS sent a second memo, repeating all of the same points about the dangerous conditions in Sudan, but this time, paradoxically, recommending termination.

The following day, Frank Cissna, who would go on to lead USCIS, remarked in an email, “The memo reads like one person who strongly supports extending TPS for Sudan wrote everything up to the recommendation section, and then someone who opposes extension snuck up behind the first guy, clubbed him over the head, pushed his senseless body out of the way, and finished the memo. Am I missing something?”

Gene Hamilton, a Department of Homeland Security lawyer who has worked in the past for Immigration and Customs Enforcement and for Jeff Sessions, asked Kathy Nuebel Kovarik, a USCIS chief who once directed her staff to dig up statistical dirt on Haitian temporary protected status-holders, to “repackage” the report. A few days later, a new version of the report was issued, this time recommending a six-month extension.

This was, once again, not good enough. With Hamilton’s further input, yet another version of the report on Sudan was issued, now suddenly noting “emerging progress and improvement in certain areas” of the country. This version again recommended termination, effective in 12 months’ time.

A DHS civil servant noted that this aggressively managed version of the report “could be read as taking another step toward providing an incomplete and lopsided country conditions presentation to support termination.”

Other reports followed the same pattern. In one memo, Kovarik suggested that “disasters” be replaced by “challenges.” In another, an adviser to Kovarik revised a report and informed its author, “I made the document fully support termination and provided comment boxes where additional data should be provided to back up this decision.”

Chen regarded this bad faith process as lending merit to the plaintiffs’ claim that the temporary protected status termination decisions violated status-holders’ equal protection rights by racially discriminating against them. It also bolstered the plaintiffs’ charge that the government violated the Administrative Procedure Act, which prohibits agencies from arbitrarily changing the criteria by which they interpret and enforce existing laws.

In order to rule out reasons for extending temporary protected status designations, three successive DHS secretaries under Trump — Kelly, Duke, and Nielsen — interpreted the law as narrowly as possible, repeatedly insisting that the statute that created temporary protected status required them to consider whether conditions pertaining only to the originating event — be it an earthquake, a hurricane, or a civil war — persisted in each country, and no other factor whatsoever. This, however, was a dramatic departure from past administrations, which conducted comprehensive reviews of country conditions and accounted for a plethora of phenomena, like armed conflicts, gang activity, economic malaise, subsequent natural disasters, that occurred in the years since the originating events, as part of their overall assessment of whether a given country was safe enough for its nationals in the U.S. to return to it. This arbitrary break from past practice, Chen concluded, indicates that the administration may have violated statutory as well as constitutional law.

Overall, the ruling paints a picture of an executive branch that has aimed to derail a law meant to protect immigrants from humanitarian catastrophes, and has done so through calculated misapplication rather than through legislation, all in order to abide the president’s disdain for nonwhite people. In November 2017, in an email to chief of staff John Kelly, Duke put it plainly, explaining that her decision to terminate temporary protected status for Nicaragua “will send a clear signal that TPS in general is coming to a close.”

“I believe it is consistent with the President’s position on immigration,” she continued.

Top photo: Ariely Murrilo, center, with her sister and grandmother, both U.S. citizens, and her mother, Milly, who is a temporary protected status recipient from El Salvador, at the launch of the “TPS Journey for Justice Caravan” on Aug. 17, 2018, in Los Angeles.