His mother, Suzanne Morrison, was among several family members who spoke in court ahead of Plasencia’s sentencing. She highlighted text messages included in court records, where Plasencia had called Perry a “moron” and wondered how much he would be willing to pay for the drugs.

She was emotional, addressing Plasencia directly. “There was nothing moronic about that man,” his mother said, adding that the doctor took an oath to protect people and he should have protected Matthew.

Plasencia also spoke in court and addressed Perry’s family, expressing both regret and remorse while his own mother cried in a seat behind him. Plasencia said he has a two-year-old son.

“I want to raise him right,” he said. “I also think about how to explain this to him.”

He also apologised to Perry’s family.

“I failed myself. There is no excuse. I can’t undo what’s been done. I know that. I should have protected him, as his mother said. I’m just so sorry.”

Along with his prison term, the Santa Monica doctor was also ordered by US District Judge Sherilyn Peace Garnett to pay a $5,600 (£4,195) fine. He was immediately taken into federal custody following the sentencing decision.

Plasencia pleaded guilty over the summer to four counts of distributing ketamine. The charges carried a maximum of 40 years in prison, though prosecutors had asked for a sentence of three years.

The four others charged in the case – including another doctor, his assistant and the two people who supplied the ketamine dose that killed him – have also pleaded guilty and are set to be sentenced in the coming months.

Best known for playing Chandler Bing on Friends, the sitcom star was vocal and public over the years with his struggles with depression and drug addiction.

Ahead of Wednesday’s sentencing, Perry’s family filed letters, known as victim impact statements, to the judge to consider ahead of making his sentencing decision.

“Matthew’s recovery counted on you saying NO,” his father, John, and step-mother, Debbie, wrote in an emotional letter. “Your motives? I can’t imagine. A doctor whose life is devoted to helping people?”

The actor’s father and stepmother said the loss had “devastated” their family as their “next patriarch” is now gone, blaming Plasencia – a doctor who Perry’s mother and stepfather called a “jackal” who repeatedly broke his Hippocratic oath.