David Walliams accepted a National Television Award trophy in his underwear as a nod to Judy Finnigan’s famous dress malfunction at the same ceremony two decades ago.
TV veteran Finnigan suffered a live wardrobe malfunction during the awards in 2000 when her bra was exposed during an acceptance speech.
Walliams, who was hosting this year’s award at London’s O2 Arena for the first time, beat Simon Cowell to be named best TV judge.
Taking to the stage in his pants, Walliams said: “Thank you. This is the moment I will be remembered for.
“When I die, which I will, they will show this clip on the news – me in my pants at the O2.
“Well, they are actually Simon Cowell’s pants. I got dressed in a hurry this morning. But tonight is not all about me. I want to thank the person who has been a huge inspiration, I think, for all of us – and he is in the room tonight.
“He won’t want me saying this because he is very modest, but I think he has done a brilliant job hosting this evening…
“Please give a huge round of applause for Sir David Wallliams.”
Other winners on the night included Anthony McPartlin and Declan Donnelly, who were co-named best television presenter for a 19th time.
McPartlin said: “On the way in we had our chat, as we would normally do, about this being the year we don’t win it.
“We were like: ‘It’s been a great run – we are very lucky to do what we do.’
“And then you go and do this again… Thank you.
“We are more grateful and more humble as the years go on, and we really do thank you from the bottom of our hearts.”
Ruth Jones accepted the award for special impact in character as Nessa from Gavin And Stacey for the show’s Christmas special.
She flirted with Sir Tom Jones, who was presenting the prize with Olly Murs.
Finnigan was on hand with husband Richard Madeley to give the live magazine show award to This Morning, with Finnigan also referencing the 2000 wardrobe malfunction: “It is nice to be back with all my clothes on this time.”
Little Mix star Jesy Nelson and Peaky Blinders were also among the winners on the night.
Nelson won the best factual entertainment award for her Odd One Out documentary, about the abuse which drove her to attempt suicide.
She thanked the BBC and her boyfriend, former Love Island contestant Chris Hughes.
A tearful Nelson said: “This is so overwhelming. I’m such a baby. Thank you so much. I want to start by thanking the BBC for being the most incredible team to work with.
“I want to thank every single person who was in the documentary for being so brave and courageous and for telling their story to the world. I want to thank my mum for being the most inspirational person in my life.
“I want to thank Chris, my boyfriend, for bringing me up every day and making me feel confident. And last but not least I want to thank every person who voted. We never expected this to have the success it did.”
Walliams earlier took aim at former Lewis actor Laurence Fox.
Fox sparked controversy during an appearance on Question Time when he questioned whether the Duchess of Sussex had faced discrimination.
Walliams told the audience: “You guys are the real stars by which I mean you are miles away from earth. Without you, us lot down here would be nothing. I mean, I would be fine – I have got my best-selling children’s books. But these people, their diaries would be emptier than Laurence Fox’s.
“Someone we would have liked to have welcomed here tonight is Nicholas Parsons but sadly he passed away today and I know everyone here wants to send our love to his family at this time.”
The veteran broadcaster died on Tuesday morning aged 96.
The ceremony continues on ITV.