Visitors take photos outside the Supreme Court on Wednesday. (Anna Moneymaker/Bloomberg News)

The Supreme Court on Wednesday weakened but upheld a long-standing precedent that says judges should generally defer to a federal agency’s expertise when ambiguous regulations are challenged.

The court’s most conservative members, who have said the deference gives too much power to unelected bureaucrats in the “administrative state,” were not satisfied.

“Today’s decision is more a stay of execution than a pardon,” wrote a disappointed Justice Neil M. Gorsuch.

Chief Justice John G. Roberts Jr. joined the court’s liberals to preserve the precedent. But he, too, said the vote should not be seen as a signal that deference to agency expertise is settled.

The court did not deliver opinions on the most important remaining decisions of the term — whether to uphold rulings finding extreme partisan gerrymandering in North Carolina and Maryland or whether to allow the Trump administration to put a question about citizenship on the 2020 Census form sent to all households.

The justices said the last day of the term will be Thursday.

Justice Elena Kagan wrote the opinion that preserves Auer v. Robbins, a ruling that Justice Antonin Scalia wrote for a unanimous court in 1997.

In announcing the decision, she said the court for nearly a century “has often deferred to agencies’ reasonable interpretations of their own ambiguous regulations.”

That is based on the presumption that Congress would want an agency with a deeper understanding of the issue than judges to be the most appropriate interpreter of its own rules.

But she narrowed the previous understanding of the Auer precedent to such an extent that Roberts wrote, “The distance between the majority and Justice Gorsuch is not as great as it may initially appear.”

A military veteran who objected to a Department of Veterans Affairs decision regarding disability benefits and then lost in federal court told the justices they should overturn Auer and a case decided in 1945, Bowles v. Seminole Rock and Sand Co.

Kagan, who has been the court’s fiercest defender of it abiding by its precedents, said the military veteran and others who objected to the deference did not make the case.

“The principle of stare decisis — in English, letting decisions stand — is an important one for stability and evenhandedness in the law,” she said. “To overrule a case, we need a special justification.”

Nonetheless, she said, the court felt that the lower court, in the case of veteran James Kisor, did not properly analyze whether the regulation he contested was truly ambiguous. It should look again, she said.

Kagan said Congress intended to leave some specific details requiring specialized expertise to agencies, which are better equipped than judges to make such decisions. But she put more restrictions on when judges should defer.

“The possibility of deference can arise only if a regulation is genuinely ambiguous,” she wrote. “And when we use that term, we mean it.”

She was joined in the opinion protecting the precedent by Justices Ruth Bader Ginsburg, Stephen G. Breyer and Sonia Sotomayor. Roberts joined in part.

Gorsuch wrote a fiery, 42-page denunciation of the Auer precedent that was mostly joined by fellow conservatives Clarence Thomas, Samuel A. Alito Jr. and Brett M. Kavanaugh.

“This rule creates a ‘systematic judicial bias in favor of the federal government, the most powerful of parties, and against everyone else,’ ” Gorsuch wrote, quoting a law-review article.

Home builders and manufacturers were among those asking the court to get rid of Auer, saying that changes in administrations lead to shifts in how agencies interpret regulations and open businesses to new liability. Those rules can cover areas including workers’ tips and environmental standards.

Gorsuch said even Scalia said he thought the precedent should be overturned, and he criticized Roberts and the liberals for the “flinch” that kept it alive.

“Retaining even this debilitated version of Auer threatens to force litigants and lower courts to jump through needless and perplexing new hoops and in the process deny the people the independent judicial decisions they deserve,” Gorsuch wrote. “All to what end? So that we may pretend to abide stare decisis?”

The case is Kisor v. Wilkie.

Juries and criminal sentencing

In another case, Gorsuch joined the liberals in ruling against the government and affirmed the central role of juries in imposing criminal penalties in the federal court system.

Gorsuch ruled in favor of a sex offender who said he was improperly returned to prison by a judge — instead of a jury — after violating the terms of his release.

“Only a jury, acting on proof beyond a reasonable doubt, may take a person’s liberty. That promise stands as one of the Constitution’s most vital protections against arbitrary government,” wrote Gorsuch, who was joined by Ginsburg, Sotomayor and Kagan. Breyer agreed only with the outcome.

The case was brought by Andre Haymond, an Oklahoma man convicted of possessing child pornography. After serving 38 months in prison, and while on supervised release, he was again found with what appeared to be child pornography. A judge subsequently determined that Haymond had downloaded and possessed child pornography and that he was required to send him back to prison for at least five years.

The court on Wednesday upheld a ruling from the U.S. Court of Appeals for the 10th Circuit finding that the new mandatory prison term violated Haymond’s constitutional right to a trial by jury, in part because it was imposed by a judge using a lesser legal standard.

In his dissent, Alito said the court’s narrow ruling could eventually lead the entire concept of supervised release to “come crashing down.” Requiring a jury to review all possible violations, he wrote, is unrealistic and unworkable in the nation’s federal court system.

In 2018, he noted, federal courts completed 1,809 criminal jury trials. In the same year, the courts reviewed 16,946 revocations of supervised release.

“Under the plurality opinion, the whole system of supervised release would be like a 40-ton truck speeding down a steep mountain road with no brakes,” wrote Alito, who was joined by Roberts, Thomas and Kavanaugh.

The case is United States v. Haymond.

Liquor laws

The court also voted 7 to 2 to strike down a Tennessee law that imposed strict residency requirements on those who could own liquor stores in the state.

The case required the court to harmonize the 21st Amendment’s authorization to states to regulate distribution of alcohol within its borders with the dormant-commerce clause, which forbids states from erecting barriers to out-of-state economic interests.

Tennessee’s law says retail licenses may be issued only to those who have been “a bona fide resident of this state during the two-year period immediately” preceding application.

Alito said it was not a close call. The constitutional amendment “is not a license to impose all manner of protectionist restrictions on commerce in alcoholic beverages,” he wrote for the majority. The two-year residency requirement is unconstitutional, he wrote, because it “ blatantly favors the State’s residents and has little relationship to public health and safety.”

Even the state’s attorney general had opined that the law was probably unconstitutional, and the state did not enforce it for six years. But a trade group, the Tennessee Wine and Spirits Retailers Association, objected to an out-of-state application in 2016 and defended the law in court.

Gorsuch and Thomas dissented, saying the 21st Amendment leaves decisions about alcohol regulation “to the judgment of the people themselves and their local elected representatives.”

The challenge was brought by Total Wine, the Maryland-based retail giant with stores in almost half the states, and Doug and Mary Ketchum, a Utah couple who moved to Memphis to buy a liquor store.

The case is Tennessee Wine and Spirits Retailers Association v. Thomas.