Matthew Perry’s final chapter ended in a Los Angeles courtroom Wednesday, where the actor’s live-in assistant received a prison sentence that closed the sprawling criminal case tied to the beloved “Friends” star’s ketamine overdose death.

Kenneth Iwamasa, Perry’s longtime assistant and confidant, was sentenced to three years and five months in federal prison after admitting he played a central role in supplying and injecting the actor with ketamine during the final weeks of his life. Prosecutors said Iwamasa was more than an employee. He became Perry’s drug courier, caretaker and enabler during a deadly spiral that culminated in the actor’s death on Oct. 28, 2023.

“You were privy to his struggle with addiction,” U.S. District Judge Sherilyn Peace Garnett told the 60-year-old in court. “Your conduct was reckless, not just on the day of his death but in the days leading up to his death.”

The sentencing marked the final courtroom chapter in a case that exposed a dark network of doctors, dealers and associates who supplied Perry with ketamine despite his well-known history of addiction. Five people ultimately pleaded guilty, including physicians and a high-profile dealer prosecutors labeled the “Ketamine Queen.”