The Supreme Court on Wednesday night said a California sheriff does not have to comply with a lower-court order requiring accommodations at a county jail experiencing a coronavirus outbreak.

The court’s vote was 5 to 4, with the court’s liberals in dissent. It follows a pattern of the court staying out of the way of local and state officials who are dealing with the pandemic, and most often Chief Justice John G. Roberts Jr. holds the controlling vote.

As is the custom in such emergency requests, the majority did not explain the reasoning for allowing Orange County Sheriff Don Barnes out from a district court judge’s order. But Justice Sonia Sotomayor said her colleagues were ignoring the court’s usual standards in granting a stay of the order.

“The district court found that, despite knowing the severe threat posed by COVID-19 and contrary to its own apparent policies, the jail exposed its inmates to significant risks from a highly contagious and potentially deadly disease,” Sotomayor wrote.

“Yet this court now intervenes, leaving to its own devices a jail that has misrepresented its actions to the district court and failed to safeguard the health of the inmates in its care.”

Justice Ruth Bader Ginsburg joined Sotomayor’s dissent. Justices Stephen G. Breyer and Elena Kagan did not sign on, but noted they would have denied the stay request.

More than 450 inmates have tested positive for the virus since March in jail facilities, but officials say most have come from newly arrested people. Unlike a prison, the jail’s population is frequently changing, they said.

Barnes said he had voluntarily released hundreds of detainees to ease conditions.

But U.S. District Judge Jesus G. Bernal said officials had not done enough. Although he declined to release even more inmates, he imposed detailed requirements dealing with adequate spacing, more soap and towels for hand-washing, more cleaning and access to sanitizer.

The requirements were “not remarkable,” Sotomayor said, which made the court’s intervention extraordinary.

“The release of even a large number of inmates does not absolve the jail of its responsibility for the health and safety of the roughly 3,000 individuals left behind,” Sotomayor wrote.

Although it is sometimes the court’s liberals in the majority and sometimes its conservatives, the court has repeatedly sided with state and local officials in challenges brought regarding the pandemic.

The justices have rejected challenges from prison inmates wanting more protection, houses of worship challenging restrictions on gatherings, and voters worried about casting ballots in pandemic conditions. Roberts almost always is the deciding vote in those decisions.

The case is Barnes v. Ahlman.