Last fall, a group of Democratic state attorneys general and immigration lawyers sued the Trump administration, arguing that the president’s decision to scrap the Deferred Action for Childhood Arrivals program (DACA) was unlawful, in part because it was motivated by Donald Trump’s alleged bigotry toward communities of color.

The Justice Department tried to get the case dismissed. A New York judge yesterday rejected that effort, citing the president’s “racially charged language.” The New York Times reported:

[I]n his order rejecting the motion to dismiss, [Judge Nicholas G. Garaufis of Federal District Court in Brooklyn] 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. “One might reasonably infer,” Judge Garaufis wrote, “that a candidate who makes overtly bigoted statements on the campaign trail might be more likely to engage in similarly bigoted action in office.”

This wasn’t a ruling on the merits of the case – the argument against the White House’s policy is still being litigated – but it was a procedural victory for those trying to protect Dreamers from Trump’s agenda.

What’s more, it was the latest evidence that the president is often his own worst enemy. Because if this dynamic sounds familiar – a court using Trump’s own words against him – it’s because it keeps happening.

* In January, the administration lost a separate DACA case, and the court ruling cited the president’s own rhetoric when ruling against his position.

* In Bowe Bergdahl’s case, the judge indicated that he would consider Donald Trump’s record of highly provocative rhetoric towards Bergdahl as part of the sentencing decision.

* The initial versions of the White House’s Muslim ban faced repeated legal difficulties because of Trump’s own rhetoric.

* The D.C. Circuit Court of Appeals concluded over the summer that Democratic attorneys general could participate in a case over health care policy as a result of Trump’s rhetoric.

* And the administration’s lawyers ran into the same problem last April trying to defend Trump’s executive order on so-called “sanctuary cities.”

In a way, Trump’s opponents should probably hope he never stops speaking his mind so freely.