The Trump administration is appealing a temporary injunction on the phaseout of Deferred Action for Childhood Arrivals, and asking the Supreme Court to get involved. (Jenny Starrs/The Washington Post)

It’s not just the “Fake News Media” that parses President Trump’s tweets in microscopic detail and uses them against him. Federal judges do it too.

The White House yet again learned that the hard way when, on Tuesday, U.S. District Judge William Alsup in San Francisco blocked the administration’s attempt to phase out Deferred Action for Childhood Arrivals, the Obama-era program that protects young undocumented immigrants from deportation.

Alsup was tasked with, among other things, determining whether it would serve the public interest to leave DACA in place while litigation over the decision to scrap the program proceeds.

On this point, he had an easy answer: Trump himself had expressed support for DACA on Twitter in September, just days after Department of Homeland Security officials rescinded it.

“Does anybody really want to throw out good, educated and accomplished young people who have jobs, some serving in the military? Really!” the president wrote in a Sept. 14 tweet. Another read: “Congress now has 6 months to legalize DACA (something the Obama Administration was unable to do). If they can’t, I will revisit this issue!”

Those lines seemed to capture the program’s benefits in a nutshell, Alsup wrote in a 49-page order.

“We seem to be in the unusual position wherein the ultimate authority over the agency, the Chief Executive, publicly favors the very program the agency has ended,” the judge wrote. “For the reasons DACA was instituted and for the reasons tweeted by President Trump, this order finds that the public interest will be served by DACA’s continuation.”

Trump’s Twitter habits have dogged the administration in court since his early days in the White House. In litigation over Trump’s executive actions, no ruling seems to be complete without a section explaining how Trump’s tweets and public statements undercut the administration’s legal arguments.

The problem has come up in cases challenging Trump’s travel bans, transgender military ban and sanctuary cities ban. Some judges have gone so far as to include images of @realDonaldTrump’s activity, an unusual sight in a federal court ruling. It goes without saying that the president doesn’t seem bothered by any of it.

This is new territory for federal judges, according to Niels Frenzen, an immigration law professor at the University of Southern California.

“We’ve never had a president tweeting like this,” Frenzen said. “You have these extreme public statements that are shedding light on the motivation of the president in regard to why he is directing Cabinet secretaries to engage in these actions. The courts are saying these are fair game.”

The administration’s impulsiveness has also been its enemy in court. In this case and others before it, judges have said the administration, in its rush, had failed to take the steps required by law to justify its executive actions.

Homeland Security officials rescinded DACA last fall, saying it suffered from “constitutional defects” that were similar to problems federal judges had pointed out in rulings blocking a related Obama-era program, Deferred Action for Parents of Americans.

Based on those decisions, the Trump administration reasoned that DACA was illegal from the get-go and that President Barack Obama exceeded his authority when he rolled it out in 2012. Therefore, the argument went, allowing it to continue put the administration at risk of getting sued.

Alsup called that conclusion “flawed,” “post hoc” and “capricious.” The Obama administration hadn’t overreached, he wrote in Tuesday’s order. In fact, he wrote, the Trump administration’s position wasn’t even based on a policy change but a “mistake of law.”

“The main, if not exclusive, rationale for ending DACA was its supposed illegality. But determining illegality is a quintessential role of the courts,” Alsup wrote.

In other words, it’s not up to the administration to decide whether one of its predecessor’s policies is illegal. That’s the U.S. Supreme Court’s job, and the high court hasn’t ruled on DACA’s legality.

If the Supreme Court were to rule on DACA and find that it was constitutionally sound, “then a policy supported as high up as our chief executive has been the victim of a colossal blunder,” the judge wrote, again referencing the president’s tweets.

In issuing the preliminary injunction, Alsup found that the plaintiffs — a collection of DACA recipients, universities and states — would suffer irreparable harm if the administration moved forward with plans to terminate the program in March before the case is resolved.

Frenzen, of USC, stressed that the plaintiffs weren’t challenging the president’s authority over the program but the motivations behind the decision to end it. The administration could have avoided some of its headaches if it had worked out a rationale for the move that was supported by evidence and offered it up for public comment, as required by federal administrative law.

“They could have said, ‘We intend to dismantle the program for the following reasons and this is how we’re going to go about doing it.’ That would give opportunities for civil rights attorneys, congressional representatives, experts and others to weigh in, in public comments,” Frenzen said. “If you had done your homework and complied with the law, you’d be in a very different place.”

If nothing else, Alsup wrote in his ruling, the plaintiffs were entitled to “learn of all flaws, if any more there be, lurking” behind the DACA decision. He noted that the plaintiffs had suggested the administration had terminated the program so it could be used as a bargaining chip to demand funding for a border wall. And again, he cited the president’s Twitter feed as evidence.

“A presidential tweet after our hearing gives credence to this claim,” Alsup wrote.

The tweet in question, posted by Trump on Dec. 29, read: “The Democrats have been told, and fully understand, that there can be no DACA without the desperately needed WALL at the Southern Border and an END to the horrible Chain Migration & ridiculous Lottery System of Immigration etc.” Alsup granted a request by the plaintiffs to take “judicial notice” of the tweet.

Alsup’s order notwithstanding, Trump appeared to double down on the proposal Tuesday night, stubborn as ever. “Our country needs the security of the Wall on the Southern Border,” he tweeted, “which must be part of any DACA approval.”

More from Morning Mix:

A pastor admitted a past ‘sexual incident’ with a teen. His congregation gave him a standing ovation.

Kumail Nanjiani opens up about his wife’s illness, the inspiration for ‘The Big Sick’

Federal court voids North Carolina’s GOP-drawn congressional map for partisan gerrymandering

Some people are buying the wrong ‘Fire and Fury’ book. Its Canadian author isn’t complaining.