In two unanimous decisions, the Supreme Court has rejected rules that provided protections for immigrants. The rejected rules came from the U.S. Court of Appeals for the Ninth Circuit, a court with a reputation as a liberal stronghold. It is the largest of all the federal courts of appeals.

In United States v. Palomar-Santiago, the Supreme Court held last week that a person who is wrongly ordered deported and returns without permission can still be convicted of felony illegal reentry, unless they meet certain strict procedural requirements. The government deported Mr. Palomar-Santiago, a legal permanent resident, arguing that his conviction for driving under the influence (DUI) was an “aggravated felony.”

Six years later, the Supreme Court held that a DUI is not an aggravated felony. As Justice Sotomayor acknowledged, “Palomar-Santiago’s removal order thus never should have issued.”

Even so, the Supreme Court held that Palomar-Santiago could still be convicted of the felony offense of unlawful reentry after a removal order, unless he could prove that he challenged his original removal order or was prevented from doing so. The Ninth Circuit had previously held that if a noncitizen was ordered deported for an offense that did not actually make them deportable, the person did not have to meet these procedural requirements in the criminal statute.

The Supreme Court issued a second decision with a similarly unfavorable outcome on June 1. In Garland v. Dai, the Supreme Court justices rejected a Ninth Circuit rule protecting asylum seekers challenging their deportation orders.

Under this rule the Ninth Circuit accepted a noncitizen’s testimony as true, unless an immigration judge or the Board of Immigration Appeals made an explicit finding that the noncitizen was not believable. The Supreme Court held that a court of appeals must accept the agency’s findings of fact—even if the agency failed to adopt the noncitizen’s version of events without expressly finding that the person was not believable—unless “any reasonable adjudicator would be compelled to conclude to the contrary.”

In less than two weeks, the Supreme Court struck down two Ninth Circuit decisions that favored immigrants.

The Ninth Circuit court hears federal appeals from nine western states—Alaska, Arizona, California, Hawaii, Idaho, Montana, Nevada, Oregon, and Washington—as well as Guam and the Northern Mariana Islands. The court was created in 1891. Its liberal reputation dates back to 1978, when President Jimmy Carter filled 10 new judgeships. In the years since, both Republican and Democratic presidents have filled vacancies on the court.

President Trump also had a big impact on the court. He appointed 10 judges to the Ninth Circuit, more than one-third of the current active judges. President Obama appointed seven. Of the full-time active judges, Democrats appointed 16 and Republicans appointed 13.

The political party of the appointing president does not determine how a judge will rule in any given case. But the Ninth Circuit has long been the target of partisan disputes, frequently tied to proposals to break up the largest circuit. President Trump was particularly critical of the court in response to Ninth Circuit decisions that blocked his anti-immigrant agenda.

Judges should never be partisan players—or used in partisan disputes. Unfortunately, in these two recent decisions, both the liberal and the conservative Supreme Court justices were united in rejecting rules that provided important protections for immigrants.