A doctor charged in the investigation of the death of Friend’s star Matthew Perry is expected to plead guilty on Wednesday in a federal court in Los Angeles to conspiring to distribute the surgical anesthetic ketamine. Dr. Mark Chavez, 54, of San Diego is one of two doctors charged and signed a plea agreement with prosecutors in August and would be the third person to plead guilty in the aftermath of the star’s fatal overdose last year.

Prosecutors offered lesser charges to Chavez and two others in exchange for their cooperation as they go after two targets they deem more responsible for the overdose death: another doctor and an alleged dealer that they say was known as “ketamine queen” of Los Angeles. Perry was found dead by his assistant on Oct. 28.

The medical examiner ruled ketamine was the primary cause of death. The actor had been using the drug through his regular doctor in a legal but off-label treatment for depression that has become increasingly common. Perry began seeking more ketamine than his doctor would give him.

About a month before the actor’s death, he found Plasencia, who in turn asked Chavez to obtain the drug for him. “I wonder how much this moron will pay,” Plasencia texted Chavez. The two met up the same day in Costa Mesa, halfway between Los Angeles and San Diego, and exchanged at least four vials of ketamine.

After selling the drugs to Perry for $4,500, Plasencia asked Chavez if he could keep supplying them so they could become Perry’s.