A California doctor has agreed to plead guilty to illegally supplying ketamine to actor Matthew Perry prior to the "Friends" star's fatal overdose, federal prosecutors announced Monday. Dr. Salvador Plasencia will plead guilty to four counts of distributing ketamine, each carrying a maximum sentence of 10 years, for a total of up to 40 years in prison.

The plea agreement, filed in federal court, outlines how Plasencia and others provided the 54-year-old actor with unsupervised doses of ketamine during the final weeks of his life, despite Perry already receiving legally prescribed infusions to treat depression and anxiety.

Prosecutors said Perry had developed an "out of control" dependence on the anesthetic, and paid approximately $55,000 for as many as six to eight injections daily between late September and early October 2023. Perry was found dead in the hot tub of his Los Angeles home on October 28. The Los Angeles County Medical Examiner determined that the concentration of ketamine in his system was comparable to levels used in surgical anesthesia.

According to the indictment, Plasencia injected Perry with ketamine both at his home and in a parking lot outside the Long Beach Aquarium. He also taught Perry's live-in assistant how to administer the drug and provided extra vials for use at home. The assistant later pleaded guilty to conspiracy to distribute ketamine, along with two others. A fifth defendant, dubbed the "Ketamine Queen" by prosecutors, was not included in the plea agreement.

Between September 30 and October 12, 2023, Plasencia sold Perry and his assistant twenty 5ml vials of ketamine, a partial package of lozenges, and syringes, according to federal filings. The plea deal states the doctor operated as part of a loosely organized network of professionals and suppliers who circumvented medical protocols for profit.

Text messages cited by prosecutors reveal a casual and exploitative attitude. In one exchange, Plasencia and co-defendant Dr. Mark Chavez-who has already pleaded guilty-discussed how much they could charge the actor. "I wonder how much this moron will pay," one message read. "Lets find out."

Plasencia was indicted last year on charges of ketamine distribution, conspiracy, and falsifying records. His guilty plea is expected to be formally entered in the coming weeks. In addition to prison time, he faces three years of supervised release and a minimum $2 million fine.