Citing President Trump’s “racially charged language,” a federal judge in Brooklyn ruled on Thursday that a lawsuit seeking to preserve a program that protects hundreds of thousands of young undocumented immigrants from deportation could continue.

The order, by Judge Nicholas G. Garaufis of Federal District Court in Brooklyn, was the strongest sign so far of judicial support for the program known as DACA, or Deferred Action for Childhood Arrivals, which has for months been the subject of a heated debate in Congress.

In October, lawyers for the Justice Department filed a motion to dismiss the Brooklyn lawsuit, claiming that the plaintiffs in the case — a coalition of immigration lawyers and a group of Democratic state attorneys general — had failed to make a persuasive case that DACA was rolled back in September because of a racial animus toward Latinos.

But in his order rejecting the motion to dismiss, Judge Garaufis pointed directly at Mr. Trump, noting that his numerous “racial slurs” and “epithets” — both as a candidate and from the White House — had created a “plausible inference” that the decision to end DACA violated the equal protection clause of the Constitution.