The judicial resistance against the Trump administration’s immigration policy continues.

On Wednesday night, a federal judge in California put a hold on the administration’s plans to stop renewing the legal status of 300,000 people living in the US from El Salvador, Haiti, Nicaragua and Sudan.

All four countries were set to lose Temporary Protected Status over the next year — meaning that immigrants who’d lived in the US for years and often decades would be forced to leave or risk deportation. The more than 1,000 Sudanese living in the US with TPS, for example, were set to lose their legal status on November 2, 2018 — less than a month from the ruling granting them a reprieve.

The ruling is a preliminary injunction — it holds the status quo in place until the courts have issued a final ruling in the case Ramos v. Nielsen, on whether the Trump administration violated the law in ending TPS for these countries. But in Wednesday’s ruling, Judge Edward Chen of the Northern District of California indicated that he’s likely to rule against the administration in his final analysis, too.

It’s yet another judicial setback for an administration that has seen most of its signature immigration initiatives — the first and second versions of the travel ban, its attempts to defund “sanctuary cities,” and its efforts to end the Deferred Action for Childhood Arrivals (DACA) program that protects about 700,000 unauthorized immigrants from deportation — halted by the courts.

More specifically, it’s another nationwide injunction against the administration (a practice administration officials and conservative Supreme Court justices are getting increasingly annoyed with) from a judge in the Ninth Circuit Court of Appeals (which Trump has painted as a rogue court).

At some point, it’s likely that the TPS case will make its way to the Supreme Court, where the administration will likely prevail — if it has appointed a conservative justice by then. In the meantime, the TPS holders who were forced to make plans to leave the country or slink into the shadows after decades in the US now have some hope they’ll be able to stay — but even less certainty about how long that will be.

Trump’s U-turn on TPS threatens to uproot hundreds of thousands of longtime US residents

The federal government has the power to grant Temporary Protected Status (TPS) for residents of a certain country who are in the US when that country suffers from a disaster. The legal protection allows them to stay and work in the US legally when their home country wouldn’t be safe to return to.

TPS can only be granted for six to 18 months at a time; the government is supposed to keep reviewing the conditions in a given country to see if it’s recovered enough to send people back. But before Trump, the government generally kept renewing the designations — especially for countries that weren’t in great shape generally. As a result, 250,000 Salvadorans have been living in the US on TPS since a 2001 earthquake; a few thousand Nicaraguans and Sudanese have had TPS in the US for even longer.

Under Trump, though, the administration’s taken a hard line that “temporary means temporary” — and that if a country’s current problems weren’t obviously connected to the original disaster that spurred a TPS designation, it didn’t deserve TPS anymore. Trump’s DHS has ended TPS for seven out of nine countries it’s reviewed.

To TPS holders themselves, this has been a tremendous shock creating ripples of anxiety. For activists (often also TPS holders), it’s a sign that the Trump administration is letting Donald Trump’s aversion to immigrants from “shithole countries” (a comment that he made in a discussion about TPS holders) drive its policymaking.

Internal government documents obtained in this lawsuit (and a similar lawsuit in Massachusetts) have certainly indicated that decisions on TPS were made from the top down. In one email exchange, top officials pushed career staffers to include more positive facts about life in Haiti, because a negative report about country conditions didn’t gel with the decision to end TPS for it.

In another, then-acting Homeland Security Secretary Elaine Duke appears to have shortened the amount of time given to Nicaraguans before losing their TPS from 18 months to 12 — after a last-minute phone call with then-White House Homeland Security Adviser Tom Bossert.

The ruling doesn’t say the government made the wrong decision to end TPS for these countries — just that it went about it the wrong way

In theory, the decision to end TPS for a given country isn’t subject to judicial review. But Judge Chen has ruled that the courts can say that the process by which DHS makes those decisions can be reviewed, and that it’s supposed to conform to the Administrative Procedure Act (which sets out how the executive branch is supposed to make policy decisions).

Wednesday night’s ruling is based in the harm that would be caused to TPS holders being forced to leave the US.

TPS beneficiaries thus risk being uprooted from their homes, jobs, careers, and communities. They face removal to countries to which their children and family members may have little or no ties and which may not be safe. Those with U.S.-citizen children will be confronted with the dilemma of either bringing their children with them, giving up their children’s lives in the United States (for many, the only lives they know), or being separated from their children.

Compared to that, the government couldn’t maintain that it would be harmed if TPS holders from Sudan (who are supposed to leave by November 2, 2018) were allowed to stay a few extra months.

But a preliminary injunction also has to consider the odds that the government will ultimately lose the case — that the preliminary injunction will become permanent.

In Chen’s view, the Trump administration’s shift from looking at all conditions in a country when reviewing TPS, to looking only at whether the country was still feeling direct impacts of the original disaster, probably violated the APA’s prohibition on making “silent” policy changes without public notice. (The government contends that it didn’t change the policies around TPS, just the emphases given to various factors.)

The more inflammatory claim in the suit is that the decision to end TPS was grounded in Trump’s own racial animus, and therefore unconstitutional. But this ruling didn’t exactly endorse that idea — it just allows that there are “serious questions” that deserve further review.

That’s enough for a preliminary injunction, given the harm to TPS holders. But it means this ruling (like the rulings against Trump’s efforts to end DACA) doesn’t point to a final ruling that forces the Trump administration to let TPS holders stay indefinitely. It’s more likely to point to a final ruling that will force the administration to go through the decision-making process again, the “right way” — even if Trump officials find a way to get to the same result.

A nine-justice Supreme Court will probably side with Trump

Judge Chen’s injunction indicates he probably won’t rule for the government. And it’s fair to assume the Ninth Circuit will rule against the Trump administration on an immigration case. But the Supreme Court has already shown more deference to the administration on immigration policy than lower courts have, with the travel-ban cases, and it’s fair to say that the conservative wing of the court will find it inappropriate to dissect the process behind a decision the administration is legally supposed to make.

That means Trump needs Brett Kavanaugh (or, in theory, another conservative justice) on the court, to give the conservative wing a 5-4 majority instead of creating a 4-4 stalemate that lets the Ninth Circuit’s ruling stand.

Some reports have indicated that if Kavanaugh’s nomination goes down and Democrats retake the Senate in the midterm elections, Trump will simply refuse to nominate an alternative, and allow the court to stay at eight justices for the foreseeable future. Rulings like this one show why this is such a terrible idea for Trump.

Without a five-justice majority, conservatives can’t overturn Ninth Circuit rulings siding against the president’s immigration policy. They can’t even beat back the scope of a nationwide injunction, and stop judges like Chen from setting policy for the entire US. (Though in cases like the TPS case, it would be very hard to enforce an injunction where immigrants’ legal status was determined by what state they were living in.)

Of course, Kavanaugh will probably be confirmed. Once that happens, the days of the judicial resistance will be numbered.

More hope — but also more uncertainty

In the short term, Wednesday night’s ruling is very good news for the 300,000 TPS holders affected by the ruling — and for the US-citizen children many of them have. The lead plaintiff in the case, 14-year-old Christa Ramos (whose parents are from El Salvador), issued a statement after the ruling: “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. Today, my family and I are celebrating.”

It’s especially good news for the 1,000 Sudanese TPS holders who had barely a month to stay in the US legally, who will almost certainly be able to stay past November 2 under this injunction. It’s probably also good news for the 5,000 Nicaraguan TPS holders whose leave-by date was January 19, 2019. While Judge Chen’s injunction says he’ll issue a final ruling as quickly as possible, it may easily take more than three months. These people might ultimately have to leave the US, if Judge Chen (or a higher court) rules for the government, but they’ll buy some time.

But unless the Supreme Court ultimately sides against the government — or the Trump administration gives up and stops fighting — this is just a temporary reprieve. It doesn’t force the administration to formally renew TPS, much less grant any more permanent legal status. And it doesn’t even require the administration to delay the departure timeline — in theory, if a ruling for the government came down on November 3, Sudanese TPS holders could be immediately eligible for deportation.

This means that instead of being forced to choose between leaving the US and becoming unauthorized, TPS holders will have to make two kinds of plans for their lives — a Plan A for what they’ll do as they continue to be allowed to live in the US legally, and a Plan B for what will happen if that reprieve ends.

CORRECTION: This article originally stated that the current expiration date for TPS holders from Sudan was November 5. It is, in fact, November 2.