Ryan Murphy confirmed that the hit series' sixth season will be its last at a Paley Center event honoring FX on Wednesday, Oct 15. TVLine was first to report the story.

The tragic death of Cory Monteith required the series co-creator to think of a different ending for the musical comedy-drama.

"The final year of the show, which will be next year, was designed around Rachel (Lea Michele) and Cory/Finn's story," Murphy said. "I knew what the last shot was, he was in it. I knew what the last line was, she said it to him. So when a tragedy like that happens you sort of have to pause and figure out what you want to do, so we're figuring that out now."

Murphy admitted that he has a "good idea" about how the show will end.

"I'm going to tell the studio and the network [in a week] how after Cory's unfortunate passing we can end the show that I think is very satisfactory," he explained. "And kind of in his honor, which I love."

Fox president Kevin Reilly told E! News in August that he didn't see the show continuing past season six.

"I would not anticipate it going beyond two more seasons," he said. "Look, never say never, but there's two very clear arcs to get to the end and conclude. If we dicover a new crop of kids and there's some breakout in life, who knows? But right now we're just thinking about two more seasons."

Last week, the show paid tribute to Monteith in the emotional episode "The Quarterback." It honored the actor's legacy and it also laid to rest one of the sweetest, and most endearing, characters on TV, Finn Hudson.

And it brought in big ratings: 7.4 million total viewers and a 2.8 in the demo. That marks a 75 percent rise from the previous episode, the best ratings of the season and Fox's best demo numbers since September 2012.