David Letterman announced plans to retire next year on Thursday's Late Show.

The host, who has been on CBS since 1993, made the announcement to his studio audience at an afternoon taping.

"The man who (runs) this network, Leslie Moonves, he and I have had a relationship for years and years and years, and we have had this conversation in the past, and we agreed that we would work together on this circumstance and the timing of this circumstance," Letterman said. "And I phoned him just before the program, and I said 'Leslie, it's been great, you've been great, and the network has been great, but I'm retiring.'"

He added: "I just want to reiterate my thanks for the support from the network, all of the people who have worked here, all of the people in the theater, all the people on the staff, everybody at home, thank you very much. What this means now, is that Paul and I can be married," he joked, in a reference to bandleader Paul Schaffer.

"We don't have the timetable for this precisely down – I think it will be at least a year or so, but sometime in the not too distant future, 2015 for the love of God, in fact, Paul and I will be wrapping things up," he added.

Letterman, 66, has been a TV fixture for 32 years. He was the first host of NBC'sLate Night,starting in 1992, but left when NBC passed him over for Jay Leno when Johnny Carson retired a decade later.

But his audience has faded in recent years in a generational shift. In the six weeks since Jimmy Fallon replaced Leno on NBC's Tonight Show, Fallon has averaged 5.2 million viewers, nearly twice as many as Letterman's 2.7 million, who led ABC's Jimmy Kimmel by just 50,000 viewers in that span, according to Nielsen. Letterman also finished dead last among adults ages 18 to 49, the sweet spot for advertisers, and was down in both measures from last year.

It's unclear how CBS will replace Letterman, and when, precisely. Craig Ferguson, who hosts the Letterman-produced Late Late Show, is not considered a likely candidate, insiders say. Moonves is known to have been interested in The Daily Show's Jon Stewart over the years, and Stephen Colbert is also a logical replacement.

In a statement, Moonves gracious thanked Letterman: "When Dave decided on a one-year extension for his most recent contract, we knew this day was getting closer, but that doesn't make the moment any less poignant for us. For 21 years, David Letterman has graced our network's air in late night with wit, gravitas and brilliance unique in the history of our medium. During that time, Dave has given television audiences thousands of hours of comedic entertainment, the sharpest interviews in late night, and brilliant moments of candor and perspective around national events. He's also managed to keep many celebrities, politicians and executives on their toes – including me. There is only one David Letterman. His greatness will always be remembered here, and he will certainly sit among the pantheon of this business. On a personal note, it's been a privilege to get to know Dave and to enjoy a terrific relationship. It's going to be tough to say goodbye. Fortunately, we won't have to do that for another year or so. Until then, we look forward to celebrating Dave's remarkable show and incredible talents."