Dara Ó Briain said Mock the Week had been "an absolute joy and an honour" as he closed the final regular episode of the long-running topical comedy panel show on Friday night on BBC Two.
The comedian said the show had been "a blast" and joked it had left the UK in a "far more stable, prosperous and happy situation" than when the first episode aired.
The programme has been on the air for 17 years and 21 series, a total of 232 episodes, and featured 131 comedians.
Show stalwarts Ó Briain and Hugh Dennis were joined by panelists Angela Barnes, Alasdair Beckett-King, Rhys James, Zoe Lyons and Ahir Shah, who all donned formal wear for the taping.
The show began with a discussion of the possible fate of the former British Prime Minister Liz Truss, having been recorded before her resignation on Thursday.
"At the time of recording (Jeremy) Hunt is still the Chancellor, and Liz Truss is still the Prime Minister," Ó Briain said, before admitting that "literally anything" could have happened by the time the episode was broadcast.
"There is a sort of irony that we have been cancelled, but we're still likely to survive longer than Liz Truss," Dennis replied.
James added that the show was "an allegory for the Tory party".
"We're all sat around in fancy clothes talking about the news as if we don't know this is all over," he explained.
As part of the special final show, Ó Briain took to the stage to participate in the Wheel of News segment and perform a short stand-up routine.
Dennis occupied the host chair as Ó Briain was given the topics of "job loss", "seeking new employment" and "retirement".
Later, panelists exchanged gifts, with Dennis, who has starred in every episode of the show, receiving a commemorative plate reading: "Well done for doing Mock the Week."
Closing the show, Ó Briain said: "We've been on for the last 17 years, we've done 232 episodes, featuring 131 comedians.
"We've seen out six prime ministers, four US presidents, seven England football managers and two Archbishops of Canterbury - that wasn't a big deal.
"It has been an absolute blast to do, and we leave with the quiet pride that in the years that we have been on, we have now left the country in a far more stable, prosperous and happy situation than it was when we started - and we'll always have that."
He continued: "We're not a very sentimental, mawkish show so I'll just say on behalf of the production team, on behalf of myself and all of the comedians here, it's been an absolute joy to talk to you and an honour.
"I'm Dara Ó Briain, goodnight."
The episode closed with a compilation of photos from past episodes as well as a small post-credits skit.
"I've just had a terrible dream that I was hosting a topical panel show for 17 years - it went on and on and on, honey!" Ó Briain exclaims, apparently waking up in bed from a nightmare.
"Yes, Dara", replies Dennis, who is sleeping in the bed beside him.
Friday's episode will be followed by two specials looking back over the history of Mock the Week, concluding the series officially on 4 November.
That's all folks! "History of Mock The Week" parts 1 and 2 will be on over the next two weeks, but there ends the most funny, energetic, sharp and silly of all the panel shows, I think. Huge thanks to all the comics, and production staff, who joined us and made it great. X pic.twitter.com/lhHcaV73BN— Dara Ó Briain (@daraobriain) October 21, 2022
Mock the Week first aired in June 2005.
Source: Press Association