PHOENIX — Arizona Corrections Director Charles Ryan has asked for a federal magistrate to be disqualified from presiding over a lawsuit over the quality of health care for inmates, arguing that the judge is biased against prison officials.

The request by the state’s prisons chief ahead of his contempt of court proceeding was filed shortly before a hearing Tuesday to examine whether the state’s inmate-care provider denied care to avoid paying a fine.

Another hearing, scheduled for Wednesday, will determine whether Ryan should be held in contempt and whether the state should face financial penalties for repeatedly falling short in improving care for more than 33,000 inmates who are covered under the lawsuit.

Ryan unsuccessfully sought to postpone the hearings while the request to disqualify U.S. Magistrate David Duncan is litigated. In an order Monday, Duncan questioned why the disqualification request was filed at 10 p.m. Friday when the state had known for months about the upcoming hearings.

Over the last year, the lawsuit has become a problem for Arizona’s Department of Corrections, with Duncan has voicing frustration over what he has described as the state’s “abject failure” to improve inmate health care after it settled allegations that inmates received shoddy health care.

Ryan was grilled by the magistrate in court last summer over whether he tried to undermine an order that prohibited retaliation against prisoners who participated in the lawsuit. Duncan also has threatened to fine the state $1,000 for each instance in which the state failed to comply with the promised changes during December and January.

The state has acknowledged more than 1,000 instances of noncompliance in December, meaning it could be fined as much as $1 million for that month alone. Arizona faces a Monday deadline for revealing instances of noncompliance in January.

The areas in which Duncan is requiring improvements include ensuring newly prescribed medications be provided to inmates within two days and making medical providers tell inmates about the results of pathology reports and other diagnostic studies within five days of receiving results.

Lawyers for the state say Duncan has shown bias by accusing prison officials of “lying through their teeth,” referring to an inmate during a July hearing as a “client,” and scheduling a hearing based on allegations in a December news story by KJZZ-FM.

The news report included an email from an employee for Corizon Health, the state’s inmate-care provider, who asked a doctor to cancel infection-disease consultations for an inmate because the company did not have a provider to send him to. The Sept. 18 email alluded to the judge’s threat to impose fines. “After 30 days we get nailed for 1000 bucks a day until they are seen,” the Corizon employee wrote.

Duncan has said the comments looked like an end-run around the court’s efforts to ensure the state is making the improvements. A lawyer for the state acknowledged last month that the email was authentic but said there was a rational explanation for the comments.

Corene Kendrick, one of the attorneys representing the inmates in the lawsuit, said the state should welcome the opportunity to defend itself in court.

“You can’t go seek another judge if you have received an adverse ruling,” Kendrick said.

The 2012 lawsuit alleged that Arizona’s 10 state-run prisons didn’t meet the basic requirements for providing adequate medical and mental health care. It said some prisoners complained that their cancer went undetected or they were told to pray to be cured after begging for treatment.

It also alleged that the failure of the medical staff at one prison to diagnose an inmate’s metastasized cancer resulted in his liver enlarging so much that his stomach swelled to the size of a pregnant woman at full term. Another inmate who had a history of prostate cancer had to wait more than two years for a biopsy.

The state denied allegations that it was providing inadequate care. The lawsuit was settled in 2014 without the state acknowledging any wrongdoing.

The last high-ranking Arizona law enforcement official to be held in contempt of court was then-Maricopa County Sheriff Joe Arpaio.

Arpaio was found in civil contempt in May 2016 for disobeying a federal judge’s order in an immigration case. He was later convicted of criminal contempt and eventually pardoned by President Donald Trump.

During his contempt case, Arpaio tried unsuccessfully to disqualify U.S. District Judge Murray Snow from the immigration case.

While his request succeeded in postponing his contempt case for two months, Arpaio ultimately failed in his bid to disqualify Snow, who later found the lawman in civil contempt and recommend a criminal contempt charge against Arpaio.

Follow Jacques Billeaud at His work can be found at .

This version corrects that that Ryan claims the magistrate is biased against prison officials, not for them.