The “lead” doctor charged in connection with Matthew Perry’s 2023 ketamine overdose death has accepted a plea deal, prosecutors announced Monday.

Dr. Salvador Plasencia has agreed to plead guilty to four counts of distribution of ketamine, a spokesperson with the Central District of California said. The charges carry a statutory maximum sentence of 40 years in federal prison.

Plasencia, 43, is expected to appear in court in the coming weeks to formally enter his guilty plea. He was arrested last August alongside Jasveen Sangha, the woman described by prosecutors as the “Ketamine Queen” of North Hollywood.

When federal officials first unsealed their 18-count indictment last year, they identified Plasencia and Sangha as the “lead defendants” in the case. They said three other defendants already had agreed to deals in exchange for their cooperation.

The other three were identified as Perry’s live-in assistant Kenneth Iwamasa, Dr. Mark Chavez (another physician), and Erik Fleming, a local man who allegedly acted as a go-between for Sangha in ketamine sales to Perry.

“[Plasencia] essentially acted as a street-corner drug dealer peddling a dangerous substance to somebody he knew was addicted,” Assistant U.S. Attorney Ian Yanniello said last year at Plasencia’s arraignment in downtown Los Angeles. “He commented to another patient that the victim was spiraling out of control, yet he still offered to sell [Perry] more ketamine.”

In his plea deal agreement signed June 13, Plasencia admitted he once injected Perry with ketamine while the actor was in the backseat of a car parked outside the Long Beach Aquarium in Long Beach, California. He also admitted he visited Perry’s house on Oct. 12, 2023, administered ketamine, and then watched as Perry’s “blood pressure spiked,” causing the actor to “freeze up.”

“Not withstanding victim M.P.’s reaction, defendant left additional vials of ketamine with defendant Iwamasa, knowing that defendant Iwamasa would inject the ketamine into victim M.P.,” the plea agreement stated.

Plasencia pleaded not guilty at his arraignment last year and was released on bond. His lawyers did not immediately respond to a request for comment on Monday.

Sangha, 42, was remanded into custody and is awaiting a trial set to begin in August. Prosecutors argued last August that she was a flight risk due to her British citizenship and because she allegedly returned to selling ketamine after both Perry’s death and the death of another man in 2019 that purportedly was linked to ketamine she supplied.

Perry, an actor best-known for playing Chandler Bing on the hit sitcom Friends, died on Oct. 28, 2023, at the age of 54 from the acute effects of ketamine, his autopsy determined. He was found face down in a hot tub at his home in the Pacific Palisades neighborhood of Los Angeles.

Officials said Perry “became addicted” to intravenous ketamine while seeking treatment for depression and anxiety at a local clinic in fall 2023. They said Perry turned to the four suppliers charged in the case when the clinic refused to increase his dosage.

According to prosecutors, Plasencia and Chavez distributed about 20 vials of liquid ketamine to Perry in exchange for $55,000 cash during the last few weeks of the actor’s life. The doctors charged Perry $2,000 for a single vial that cost Chavez approximately $12, officials said.

“I wonder how much this moron will pay?…[Let’s] find out,” Plasencia allegedly texted Chavez on Sept. 30, 2023, according to the indictment. Later that day, Plasencia injected Perry with ketamine at the actor’s house and left vials behind for Iwamasa to administer to Perry even though the assistant had no medical training, the filing stated. After the meeting, Plasencia allegedly texted Chavez that the interaction was “like a bad movie.”

Chavez is due to be sentenced on Sept. 17. Fleming has his sentencing scheduled for Nov. 12, while Iwamasa has his sentencing set for Nov. 19.