Court documents are shedding light on the death of "Friends" actor Matthew Perry, including his final days alive.

The documents detail the final chapter in the beloved actor's highly publicized struggle with addiction, including an eventual 2023 relapse that resulted in his death from "the acute effects of ketamine" in October of last year.

Earlier this week, California prosecutors announced five people had been charged in connection to Perry's death during a news conference on Thursday for "distributing ketamine to Perry during the final weeks of the actor’s life."

Among the five charged was Perry's personal live-in assistant Kenneth Iwamasa, who referred to himself as "Batman's butler," according to court docs. Iwamasa, 59, pleaded guilty on Aug. 7 to one count of "conspiracy to distribute ketamine resulting in death and serious bodily injury" and he faces up to 15 years in prison.

Investigators allege Iwamasa conspired alongside others to purchase at least $55,000 worth of ketamine on behalf of Perry to inject the actor with the drug without proper medical licensure. Ketamine is an anesthetic drug, and a party drug, that has psychedelic contents.

Need a break? Play the USA TODAY Daily Crossword Puzzle.

At the time of his death, Perry was receiving ketamine infusion therapy for depression and anxiety. The medication has hallucinogenic effects that alter the perception of sight and sound and cause users to feel devoid from pain and out of control of their surroundings. As an FDA-approved anesthetic, ketamine has been recognized as a fast-acting antidepressant drug for decades.

Physician Salvador Plasencia, 42, and Jasveen Sangha, 41, whom the DOJ's press release referred to as the "The Ketamine Queen" of North Hollywood, were charged with 18 counts for their role in Perry's death.

Three other co-conspirators were also charged: Dr. Mark Chavez and Erik Fleming, both 54, as well as Iwamasa. But it's Iwamasa's plea agreement that illustrates Perry's final days — and his private battle with ketamine addiction, leading up to the moment he was found face down by Iwamasa in a hot tub at his Pacific Palisades home in Los Angeles.

5 people charged in Matthew Perry'sdeath, including 'Friends' actor's doctor, assistant

Matthew Perry froze up from 'a large dose of ketamine' two weeks before death

On Sept. 30, Iwamasa learned how to inject ketamine after Dr. Plasencia, who was nicknamed "Dr. P," administered two shots of ketamine" to Perry and then taught the personal assistant how to make injections and left behind a vial for him. For days, Iwamasa also used coded language to communicate with co-conspirators to obtain more ketamine.

But two weeks before his death, on Oct. 12, investigators say Plasencia administered "a large dose of ketamine" to Perry, which caused "an adverse medical reaction" that led to a blood pressure spike which caused Perry to "freeze up" where he "could not speak or move."

According to the plea agreement, Plasencia allegedly told Iwamasa "let's not do that again."

The court documents also appear to suggest that Iwamasa and Perry planned to take a break from ketamine use as Plasencia, who is listed as "co-conspirator 1" in court documents, texted Iwamasa: “Hi. I know you mentioned taking a break.I have been stocking up on the meanwhile. I am not sure when you guys plan to resume but in case its when im out of town this weekend I have left supplies with a nurse of mine."

But investigators say Iwamasa never should've injected Perry in the first place.

'Shoot me up with a big one': Investigators say Matthew Perry died after fatal third dose of ketamine in five hours

On October 28, 2023, the day that Perry died, Iwamasa allegedly injected him with a shot of ketamine at 8:30 a.m. and again in the afternoon at 12:45 p.m. as Perry watched a movie. Then, about 40 minutes later, Perry asked his personal assistant to prepare his hot tub and “shoot me up with a big one," in reference to another injection of ketamine.

Iwamasa later injected Perry with a third syringe of ketamine and gave it to him "in or near the jacuzzi." According to the authorities' timetable, Perry had received three ketamine shots in a five-hour period.

'Acute effects of ketamine' linked toMatthew Perry's death: What to know about drug

According to the plea agreement, Iwamasa left Perry's home with the actor unattended to run errands and returned to find Perry dead, face down in the pool. The Los Angeles Fire Department responded to Perry's Pacific Palisades home at 4:07 p.m. and found "an adult male unconscious in a stand-alone jacuzzi." Responding officers pronounced him dead at 4:17 p.m.

"A rapid medical assessment, sadly, revealed the man was deceased prior to first responder arrival," Nicholas Prange, an LAFD spokesperson, told USA TODAY in a statement on Oct. 30 last year. In December, more than a month after Perry's death, the Los Angeles County Medical Examiner's office released Perry's autopsy report, which was obtained by USA TODAY. His death was ruled an accident, with the cause being "the acute effects of ketamine."

Just days before Perry's final day alive, he posted a photo of himself on Instagram in a jacuzzi with oversized headphones on. He captioned the photo, "Oh, so warm water swirling around makes you feel good? I'm Mattman."

Perry detailed addiction struggles in book: 'I never gave up'

The final chapter "Batman" of Perry's New York Times-bestselling book, "Friends, Lovers, and the Big Terrible Thing" is a culmination of his decades long struggle with sobriety, alcoholism and drug addiction. The last pages of the memoir discuss the peace he's found at home, sober, high above the ocean with a view at his home of the California coast.

"Addiction — the big, terrible thing — is far too powerful for anyone to defeat alone. But together, one day at a time, we can beat it down," Perry wrote. "The one thing I got right was that I never gave up."

Then, the book's last words: "Someday, you, too, might be called upon to do something important. So, be ready for it and when whatever happens, just think 'What would Batman do?' and do that."

Contributing: KiMi Robinson, Taijuan Moorman, Anthony Robledo, Jenna Ryu

Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.