“Glee” showrunner Ryan Murphy has opened up about the loss of his friend and series star, Cory Monteith.

In his first interview since the actor’s tragic death on July 13, Ryan revealed he staged an intervention to get Cory sober back in March, after learning the 31-year-old was using again.

“He wanted to continue working and we said, ‘That’s not an option. No. The TV show doesn’t matter, your life matters,’” Ryan told E!. “So we booked a rehab and a facility… I was very surprised that he went so readily.

“His last words to me were, ‘I want to get better,’ and I always felt and continue to feel even in his death that he did, that he really wanted to fight it and he was humiliated and shamed,” he continued. “We reassured him that the only thing that mattered was him getting better and his job was 100 percent protected because he thought he was going to get fired.”

Ryan said Cory’s death has been even more “shocking” and “debilitating” than is to be expected because the entire “Glee” family was rooting for him and supporting him in his quest for sobriety.

“It also feels in some weird way like I failed, even though I know that that’s the plight of addicts, so what can you do?” he said. “But it’s just really hard and really upsetting. I feel like we did everything that we could and I know that [Cory’s girlfriend and co-star] Lea [Michele] feels she did everything that she could.”

The “Glee” boss also revealed there was talk of ending the series completely, but said Lea made the call to continue with the show (which will have therapists on hand to help the group cope with Cory’s loss as they return to the set without their friend and co-star).

“[Lea] felt that the best thing for the cast and crew was to be together and to get back to work and be together every day and talk about our memories of him,” he explained. “So we decided to do that with Lea’s blessing and we’re going to go back to work and have grief counselors on the set for two weeks because people are really hurting.”