Anyone who somehow believed that Trump was a “champion” of equality got a bucket of ice water in the face this month following a relentless blitzkrieg on LGBTQ rights.

His most outwardly egregious assault on the LGBTQ community was an Aug. 25 order banning transgender people from the military. That policy, first hinted at in a series of July tweets, stands to reverse a year-olddirective permitting trans people to serve openly for the first time. Gen. James Mattis stated in a Friday memo that the military will spend the next five months deliberating on how to rollback transgender military service. The Pentagon will finalize its guidance on the policy by Feb. 21.

That decision was just the latest slap in the face from the president in 2017. This has been a year in which Trump rescinded an Obama-era policy allowing trans students to use bathrooms appropriate to their gender identity and appointed a clown car of anti-LGBTQ bigots to the White House. These days the Oval Office looks an awful lot like a hate group.

But what may have the most lasting impact of all the administration’s strikes on LGBTQ rights is its attempt to turn the court system against queer and trans people. As the United States moves sharply to the right, the courts have proven themselves a critical safeguard against the bigotry of our own government. Sitting case law can’t be overturned by the capriciousness of an administration determined to discriminate in any way it can.

The Oval Office, however, is working to change that by taking away one of the few federal gatekeepers the LGBTQ community has left. If the Trump administration is successful in doing so, there’s no telling what damage could be done.

This warning might sound like hyperbole, especially in a year filled with predictions of doom. But the White House made its mission more than clear in a September amicus brief filed in Masterpiece Cakeshop v. Colorado Civil Rights Commission. The Department of Justice argued that businesses have a Constitutional right to refuse service in accordance with their sincerely held religious beliefs. The plaintiffs, a gay couple in Colorado, sued a local bakery when its owners refused to make a cake for their 2012 wedding.

“A custom wedding cake can be sufficiently artistic to qualify as pure speech, akin to a sculptural centerpiece,” the Justice Department wrote. “In short, a custom wedding cake is not an ordinary baked good; its function is more communicative and artistic than utilitarian.”

That statement was unprecedented. Before 2017, the Department of Justice had never sided in favor of an individual’s right to discriminateespecially in a suit in which it wasn’t even named. But then again, the government’s top defense attorneys never had to contend with a boss like Jeff Sessions. As the Attorney General of Alabama, Sessions once used the power of his position to attempt to block an LGBTQ conference from being held at a public university.

This is actually the second Supreme Court case this year in which the office of the Attorney General has sided against the LGBTQ community, reinterpreting existing jurisprudence to do so.

In a July brief on Zarda v. Altitude Express, the Justice Department declared that the Civil Rights Act of 1964 does not apply to sexual orientation. This declaration broke with an earlier determination from the Equal Employment Opportunity Commission, which came to the opposite conclusion in a 2015 vote. The EEOC cited as precedent cases such as Oncale v. Sundowner Offshore Services, the latter of which determined that sexual harassment between members of the same gender still constitutes harassment.

The Justice Department alleged, however, that the issue has been “settled for decades.”

Although the Civil Rights Act was amended in 1978 and 1991, the agency pointed to the fact that Title VII language was not updated to include discrimination on the basis of gender identity or sexual orientation in either instance. Currently, the law forbids bias on the basis of characteristics like sex, race, and national origin.

But the DOJ’s claim that the question of whether LGBTQ people should be included in civil rights law is “settled” is flatly untrue. The Justice Department is more than aware of this and has actively worked to erase the positions of the previous administration. Attorney General Eric Holder stated in a 2014 memo that the Obama White House would consider trans identity as a federally recognized form of sex discrimination.

Not only is the matter of LGBTQ rights far from “settled,” the courts have frequently ruled against religious conservatives hoping to stem the tide of progress. This has been especially true over the past year.

Even as Trump rolls back the rights of transgender students, Jackie Evancho’s sister successfully filed an injunction against her Pennsylvania high school in June after faculty banned her from using a gender-affirming bathroom. This was one of several high-profile court victories for trans students in 2017. Wisconsin high schooler Ash Whitaker won his right to use the restroom at his school in May following an extremely favorable verdict from the Seventh Circuit Court of Appeals.

Although there have been notable setbacks in recent months, the arc bends toward justice for the LGBTQ community. Each of these favorable verdicts builds court precedent, which sets the table for further victories.

Consider the Trump administration’s briefs in Zarda and Masterpiece Cakeshop an attempt to rip off that tablecloth, but unlike in the magic trick, the place settings come with it. Trump hates the court system, and it’s hardly speculation to say he would love to dismantle it if he had the power. The courts have consistently proven a problem for him. Earlier this year, federal judges blocked the president’s proposed ban on immigration from several majority-Muslim countries and a DOJ decision to strip funding from sanctuary cities.

When the Trump administration takes each additional swipe at the LGBTQ community, how do advocacy groups respond? By suing the White House.

Following Trump’s ban on trans troops, organizations like the National Center for Lesbian Rights, LGBTQ Legal Advocates & Defenders, Lambda Legal, and American Civil Liberties Union all threatened to fight the decision in the courts.

If the Trump administration is victorious in pushing its position in either of the cases mentioned above, the ramifications of that blow would be immeasurable. Should a Supreme Court with Neil Gorsuch on the bench side with Trump in Masterpiece Cakeshop, individuals would have a First Amendment right to discriminate. If the Justice Department sways SCOTUS in Zarda, it could jeopardize the painfully few employment protections LGBTQ people have. It’s still legal to fire someone for being queer or transgender in 30 states.

The president who succeeds Trump is likely to overturn controversial policies like the military ban, but purging the justice system of these bad rulings would take decades. Such harm can’t be remedied in an executive order or a 5 a.m. presidential tweetstorm.

Every single right that the LGBTQ community has is precious and must be protected at all costs, but our jurisprudence holds a special importance. America’s system of checks and balances is designed to shield vulnerable populations from people like Trump, politicians that would abuse the powers of the Oval Office for malice and ego. If these protections are eroded or jeopardized in any way, there’s little stopping the president from doing anything he wants.