David Walliams prompted boos at the 25th National Television Awards after cracking a joke about former Love Island host Caroline Flack.
The crowd at London’s O2 Arena jeered when the comic quipped about Flack being the Masked Singer’s anonymous Hedgehog.
The Britain’s Got Talent star, 48, was hosting the awards for the first time after taking over from Dermot O’Leary.
The Masked Singer’s host Joel Dommett and the show’s anonymous Hedgehog character joined Walliams on stage to present the best serial drama prize to Emmerdale, which won the gong for a fourth year.
When Walliams returned to the stage, he quipped: “Thank you – and so nice to see Caroline Flack back on TV as well.”
Flack, who stepped down from the ITV2 dating show following an assault charge, did not attend the event but wished the cast and crew of Love Island luck ahead of the night.
The show also saw Walliams secure the prize for best TV judge, Ant and Dec win the award for best television presenter for a 19th time, and This Morning earn the live magazine show gong.
Strictly Come Dancing took home the best talent show gong and Sir Michael Palin paid tribute to his late Monty Python co-star Terry Jones as he accepted the special recognition award.
Earlier in the night, Walliams accepted the best TV judge award in his underwear as a nod to Judy Finnigan’s famous dress malfunction 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.
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 Walliams.”
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 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.