BOSTON (Reuters) - A federal judge in Boston on Monday rejected a bid by the Trump administration to dismiss a lawsuit alleging that its decisions to end temporary protections for immigrants in the United States from Honduras, Haiti and El Salvador were racially motivated.

Haitians migrants wait to make their way to the U.S. and seek asylum at the San Ysidro Port of Entry in Tijuana, Mexico, July 15, 2016. REUTERS/Jorge Duenes/File Photo

U.S. District Judge Denise Casper in Boston ruled that a group of immigrants and two organizations could move forward with a lawsuit challenging the administration’s termination of the protective status enjoyed by thousands of people from those three countries.

She said the lawsuit’s allegations about “statements of animus” by officials including President Donald Trump coupled with claims about a shift in policy “allege plausibly that a discriminatory purpose was a motivating factor in a decision.”

The lawsuit cited statements it said showed Trump’s “dislike and disregard for Latino and black immigrants,” including reported remarks in January by Trump saying immigrants from Africa and Haiti come from “shithole countries.”

“Plaintiffs have successfully made out their prima facie case,” Casper wrote.

The U.S. Justice Department, which represented the administration in court, had no immediate comment. It had argued that the courts lack jurisdiction to review the decisions at issue.

Temporary protected status, or TPS, offers protection from deportation to immigrants already in the United States, including those who entered illegally, from countries affected by natural disasters, civil conflicts and other problems.

The Trump administration has shown a deep skepticism toward the temporary protected status program and has moved to revoke the special status afforded to thousands of immigrants from El Salvador, Haiti, Honduras, Nicaragua and Sudan.

About 400,000 immigrants from countries designated for temporary protected status live in the United States, including 262,500 from El Salvador, 58,550 from Haiti and 86,000 from Honduras, according to the lawsuit.

In May, the Department of Homeland Security said it would end temporary protections for Hondurans in January 2020. Haitians and Salvadorans are set to lose their special statuses in July 2019 and September 2019, respectively.

The lawsuit was filed by 14 immigrants from those three countries and two non-profit organizations, Haitian-Americans United and Centro Presente.

The complaint contends the administration’s actions violate the U.S. Constitution’s equal protection and due process provisions.

“The judge in this case made clear that TPS recipients have viable constitutional claims and that they deserve a day in court,” said Iván Espinoza-Madrigal, the executive director of the Lawyers’ Committee for Civil Rights and Economic Justice, which represented the plaintiffs.