The Supreme Court on Thursday night refused to stop court-ordered surgery for a transgender prisoner in Idaho.

Adree Edmo is scheduled for what the state calls “sex reassignment surgery” and Edmo’s lawyers call “gender confirmation surgery” in July. The U.S. Court of Appeals for the 9th Circuit, over the objection of its conservative members, said Idaho corrections officials had violated the constitutional prohibition of cruel and unusual punishment by withholding the treatment.

As is common, the Supreme Court did not give a reason for refusing Idaho’s request for a stay of the lower court’s order. Justices Clarence Thomas and Samuel A. Alito Jr. would have granted the stay.

The state has separately asked the court to take up the case for review, but it warned that without the stay, the case might become moot. Medical preparation for the surgery has been underway for months.

In court papers, Idaho and Edmo’s lawyers had debated the importance of the case for other transgender prisoners. Idaho said it was a case with national implications, and that the 9th Circuit had become the first court to hold that there had been a violation of a transgender prisoner’s rights because the state had not conformed with guidelines issued by a transgender advocacy group.

“Idaho will sustain irreparable harm because Idaho taxpayers will have been forced to fund a controversial surgery that Edmo’s treating doctor determined in good faith was not medically necessary,” Idaho Attorney General Lawrence G. Wasden wrote in his application to the court.

“Edmo, an indigent prisoner, does not have the financial ability to reimburse Idaho taxpayers for the expenses associated with the surgery.”

Edmo’s lawyers said the surgery would be covered by the contract Idaho has with a private company to provide health care to prisoners. But more importantly, they told the court that the 9th Circuit’s ruling did not carry national implications.

“This case is a fact-intensive dispute about whether a particular treatment is medically necessary for one individual” and whether the state’s expert treating Edmo was “deliberately indifferent to her serious medical needs and ongoing risk of harm,” wrote lawyer Lori Rifkin.

Edmo, 32, was imprisoned in 2012 after being convicted of sexually assaulting a sleeping 15-year-old boy. In prison, she has been treated for gender dysphoria, a psychological condition caused by the disconnect between a person’s experienced gender and the one assigned at birth.

In prison, Edmo has twice attempted to self-castrate to remove her testicles and eliminate testosterone in her body. A prison psychiatrist, Scott Eliason, treated Edmo with counseling and hormone therapy but said surgery should wait. Edmo could be released next year.

A panel of the 9th Circuit said that a diagnosis of gender dysphoria will not always be enough to secure a mandate of surgery. But looking specifically at the facts in Edmo’s case, the panel wrote that “responsible prison officials [denied] such treatment with full awareness of the prisoner’s suffering” in violation of the Eighth Amendment.

Conservatives on the 9th Circuit lost an attempt to have the case reconsidered. Judge Daniel P. Collins was among those who said the panel “strayed far from any proper understanding of the Eighth Amendment.”