A federal judge in Boston is allowing a lawsuit against the Trump administration’s ending of temporary protections for immigrants to proceed on the grounds the decisions were motivated by racial prejudice.

U.S. District Judge Denise Casper rejected Monday the government’s bid to dismiss the lawsuit, which a group of immigrants and civil rights organizations filed in February in response to the cancellation of Temporary Protected Status (TPS) for Haiti and El Salvador.

Statements by administration officials — including President Donald Trump — make it plausible that “a discriminatory purpose was a motivating factor in a decision” to wind down TPS protections, Casper said.

“Plaintiffs have successfully made out their prima facie case,” she wrote in a ruling that allows the lawsuit to go forward, according to Reuters.

TPS is a humanitarian relief program that offers work permits and a temporary reprieve from deportation to foreign nationals of countries affected by war, natural disaster or some other extraordinary crisis. Though it is not intended to be a permanent solution, TPS has in some cases turned into a de facto immigration program for people from countries that have held the designation for decades. (RELATED: This Is How ‘Temporary’ Protected Status Became Permanent For 300,000 People)

The Trump administration in January rescinded TPS for El Salvador, which was given the designation in 2001 after a series of destructive earthquakes. Roughly 200,000 Salvadoran nationals living in the U.S. with TPS have until September 2019 to return to their home country unless they are eligible for another immigration benefit.

Before that, the government made a similar determination for Haiti, which was granted TPS in 2010 in response to a massive earthquake that destroyed much of the country. About 59,000 Haitians have until July 2019 to leave the U.S. or adjust their immigration status.

The decisions prompted a lawsuit on behalf of 14 TPS holders from those two countries plus Honduras, which lost TPS status in May. The plaintiffs contend the cancellation of TPS resulted from racial prejudice and violates the U.S. Constitution’s equal protection and due process clauses. (RELATED: Immigration Activists Play Race Card In Lawsuit Over Trump’s Decision To End TPS)

Among other statements, the complaint cited media reports that Trump said Haitians who received visas to enter the U.S. in 2017 “all have AIDS” and that Haiti and African countries are “shitholes.” It also referred to Trump’s campaign announcement, in which he said some Mexican immigrants were “bringing crime” and were “rapists.”

Casper’s ruling comes days after Homeland Security Secretary Kirstjen Nielsen announced an 18-month extension of TPS for about 500 Somali nationals until March 17, 2020. Nielsen made a similar determination earlier this month for about 1,250 TPS beneficiaries from Yemen, who will be allowed to renew their benefits through March 3, 2020.

In most other cases, however, the Trump administration has sought to wind down TPS protections for people from countries it says no longer merit the designation. Over the past year, the countries that have lost TPS include El Salvador, Haiti, Honduras, Nepal, Nicaragua and Sudan.

Altogether, roughly 400,000 people from those countries will have to return home unless they qualify for another immigration benefit.

Follow Will on Twitter

Send tips to will@dailycallernewsfoundation.org.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.