"Glee" co-creator Ryan Murphy has revealed how he saw the show ending before star Cory Monteith died in July, according to People.com.

Five months after Monteith died from a heroin and alcohol overdose, Murphy told Entertainment Weekly what he told people during Monteith's eulogy.

"The ending of Glee is something I have never shared with anyone, but I always knew it," Murphy said during the eulogy just published in Entertainment Weekly. "At the end of season 6, Lea (Michele)'s Rachel was going to have become a big Broadway star, the role she was born to play. Finn was going to have become a teacher, settled down happily in Ohio, at peace with his choice and no longer feeling like a Lima loser."

Murphy even had the last line of dialogue written in his head: "Rachel comes back to Ohio, fulfilled and yet not, and walks into Finn's glee club. 'What are you doing here?' he would ask. 'I'm home,' she would reply. Fade out. The end."

According to People.com, it would be a fitting end for Monteith's Finn, who was frequently described as a sensitive and loving presence on- and off-set. Murphy recalled Monteith demonstrated his best traits when the cameras first starting rolling.

"The first scene of the pilot was Cory's Finn and Matt (Morrison)'s Mr. Schu. None of us really knew what we were doing," he said. "At the end of his first take, Cory could see I, his director, was a little unsure. He came up to me with a big grin and said, 'This is going to be fun.' He was terribly right, and terribly wrong."

Contact Tony Hicks at Facebook.com/BayAreaNewsGroup.TonyHicks or Twitter.com/insertfoot.