SAN FRANCISCO (CN) – A federal judge in San Francisco hinted Tuesday he would block the Trump administration’s decision to yank temporary authorization from hundreds of thousands of immigrants living in the United States to escape dangerous conditions in their home countries.

U.S. District Judge Edward Chen said President Donald Trump’s racist agenda toward non-white immigrants appeared to have influenced his cabinet’s November 2017 decision to end temporary protected status [TPS] for about 390,000 immigrants from Sudan, Nicaragua, Haiti and El Salvador, possibly warranting a temporary block on the order while Chen reviews the case.

At Tuesday’s hearing, Chen referenced a January 2018 statement from Trump characterizing immigrants from TPS countries as undesirable. “The question is, if there’s this allegation [by the plaintiffs] of less-than-pure motives on the part of the White House with respect to immigration policy, and TPS in particular, and those subject to this particular decision, who are characterized as coming from ‘shithole countries,’ whether that influenced [former Acting Secretary of Homeland Security Elaine Duke] in any way,” Chen said.

“The fact that she’s mindful of the president’s policy suggests there’s a degree of influence coming from the White House on the merits of this TPS decision,” he said, referring to Duke.

Nine TPS holders and five U.S. citizen children of TPS holders sued the Trump administration in March over the termination of protected status for immigrants from Sudan, Nicaragua, Haiti, and El Salvador, many of whom had lived in the United States for years.

Citing Trump’s racist statements about immigrants in the media, including one that undocumented immigrants are “animals,” the plaintiffs say the administration terminated the TPS program out of racism, a violation of the Constitution’s equal protection clause.

They also say the administration broke the law by failing to explain its sudden change to the rules about how it makes TPS decisions.

The statute requires that decision makers consider current conditions in immigrants’ home countries so they won’t be sent into harm’s way. The plaintiffs claim the administration changed the rules to consider only the conditions in each country when TPS status was first granted, but the administration disputes this interpretation.

On Tuesday, Justice Department attorney Adam Kirschner argued Duke terminated TPS designations based on current country conditions and not on race, citing internal documents Duke wrote showing she solicited input from ambassadors to TPS countries and from military personnel stationed in the region before making her decisions.

“She describes…migration and drug enforcement issues and a general perspective, and this is again her grappling with this decision,” Kirschner said. “You can see in her internal memo her struggling at trying to reach a decision here.”

Chen, however, noted a sentence in Duke’s documents in which she described her decision as being consistent with Trump’s America First policy view that the TPS program “must end for these countries soon.”

“This suggests the America First view is what’s driving the conclusion that the TPS program must end soon,” Chen said, identifying the plaintiffs’ claim that, “America First means ending immigration status for those who are non-white.”

Kirschner didn’t have a clear answer when asked exactly what America First entails.

Outside court, Kirschner deferred a question about America First to a Justice Department spokesperson, who also had no immediate comment.

Ahilan Arulanantham, an attorney with the American Civil Liberties Union representing the plaintiffs, pointed out although independent staff had determined conditions in the four TPS countries warranted protection, the administration ignored them, a departure from the way previous administrations made TPS decisions.

“This is not about disagreement over country conditions,” he said. “This is about driving the president’s [discriminatory] agenda.”

According to the plaintiffs, the TPS program provides legal status and work authorization for more than 400,000 people living in the United States. If the administration’s decision takes effect, 98 percent of TPS status holders will lose protection.

If Chen doesn’t block it, the first protected status terminations will occur Nov. 2, putting 1,000 Sudanese immigrants at immediate risk of deportation. More waves of terminations are scheduled to follow, according to Emilou MacLean, a National Day Laborer Organizing Network attorney who also represents the plaintiffs.

“What was critically important today,” she said outside court, “was the request that the court stop immediately these decisions from going into effect in recognition of the strong legal arguments that have been presented as well as the tremendous and irreparable harms that will be inflicted on the plaintiffs in this case as well as hundreds of thousands of other TPS holders if the court does not intervene immediately.”

In August, Chen refused to dismiss the case, ruling “plaintiffs have plausibly pled that President Trump made statements which a reasonable observer could construe as evidence of racial bias animus against non-white immigrants, and that he thereafter influenced and tainted DHS’s decision-making process with regard to TPS.”