A federal judge in California ruled on Tuesday that the Trump administration’s move to wind down President Barack Obama‘s DACA (Deferred Action for Childhood Arrivals) program was done improperly, and that those undocumented immigrants who already had benefits under DACA could continue to renew them. In his ruling, Judge William Alsup cited a number of sources that backed his decision, including President Donald Trump‘s own tweets on the issue.

DACA allowed people who entered the United States illegally as minors brought by their parents to receive certain benefits and protections from deportation. Those who received DACA benefits have been commonly known as “Dreamers.”

In a section of his opinion dealing with public interest factors, Judge Alsup (getting a little snarky) writes, “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,” noting President Trump’s own expressed support for Dreamers. Specifically, the judge quoted a September tweet, where Trump said, “Does anybody really want to throw out good, educated and accomplished young people who have jobs, some serving in the military? Really! . . . ”

Judge Alsup then 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.” Basically, he’s basing part the court’s ruling against the Trump administration on Trump’s own supposed support for the other side.

The judge determined that the Trump administration’s decision to get rid of DACA was “based on the flawed legal premise” that DACA was created improperly in the first place. Therefore, he said, the Trump administration’s decision could be set aside. Additionally, while the DACA repeal was based on the notion that the program was illegally enacted to being with, Judge Alsup said, “determining illegality is a quintessential role of the courts,” not the administration. The judge also cited a number of reasons why DACA was indeed permissible.

Judge Alsup also said the move to wind down DACA was not exempt from judicial review, as the government had claimed. While DACA itself was a decision to not enforce certain rules, the decision to end it was an active rescission of a commitment that also dealt with matters of law.

The ruling says that, at least as the case continues, the administration must allow current DACA recipients to renew their benefits. New applicants, however, will not be permitted.

Have a tip we should know? [email protected]