Britain's Got Talent, Love Island and Blue Planet II were among the winners at this year's Bafta Television Awards.
Declan Donnelly was at the ceremony to accept the entertainment programme prize for Britain's Got Talent - but co-host Ant McPartlin wasn't there.
Love Island won its first Bafta, for best reality show, while Casualty also scooped its first Bafta for 11 years, for best soap or continuing drama.
Sir David Attenborough picked up Blue Planet II's Must See Moment prize.
That was the only award voted for by viewers, and it was for the scene showing a mother pilot whale refusing to let go of her dead calf.
Sir David told viewers: "We set out to try and show the seas, the oceans, for what they are - their beauty, their wonder, their splendour, their intricacy.
"But also the truth about what what we're doing to them. The fact that that one particular moment rang a bell in the minds and consciences of people throughout this country is something that pleases all of us more than I can say."
Two Ant and Dec shows were nominated in the entertainment programme category - Ant & Dec's Saturday Night Takeaway and Britain's Got Talent.
In the end, BGT won. Dec went on stage with the show's team to accept the award, but he didn't speak from the podium. Ant missed the event because he's taking "time off" following his drink-driving conviction.
Gangster epic Peaky Blinders beat shows like Line of Duty and The Crown to the coveted prize for best drama series.
Peaky Blinders, which has gone from strength to strength over four series, had never won a Bafta TV Award before and had just one nomination this year.
Creator Steven Knight said the win "means a lot to all of the team" - but did express his disappointment at the fact its stars Cillian Murphy, Helen McCrory and Paul Anderson weren't nominated.
"Soon maybe they will be here as well because I think they deserve to be," he said.
Line of Duty, which had led the nominations with four, ended up empty-handed.
Elsewhere, Three Girls, based on the Rochdale abuse scandal, won two prizes - best mini-series and best actress for Molly Windsor.
She told the ceremony: "Three Girls was born out of the courage of the real three girls, and the real Holly, Amber and Ruby who told their story over and over and over and told it again to us.
"I just want to say thank you for recognising how selfless that is and how brave that is."
Three Girls was one of a string of dramas inspired by real-life crimes to be honoured. Murdered For Being Different, about the murder of Sophie Lancaster in 2007, was named best single drama.
And Brian F O'Byrne, who played the father of murdered Rhys Jones in ITV's docudrama Little Boy Blue, was named best supporting actor.
He dedicated the award to Rhys, who was 11 when he was shot dead in Liverpool in 2007.
"It's kind of difficult to get an award to play somebody who is living and who is at home tonight, like the last 10 years, suffering grief for the loss of their child," he said.
BBC Three mockumentary This Country won two awards - best scripted comedy and best female performance in a comedy programme for Daisy May Cooper.
Other winners included:
- Leading actor: Sean Bean - Broken
- Supporting actress: Vanessa Kirby - The Crown
- Entertainment performance: Graham Norton - The Graham Norton Show
- Male performance in a comedy programme: Toby Jones - Detectorists
- Feature: Cruising with Jane McDonald
- Single documentary: Rio Ferdinand - Being Mum and Dad
The ceremony at London's Royal Festival Hall was hosted by Sue Perkins, who delivered an opening monologue that put a focus on politics, gender equality and revelations about sexual harassment and abuse in the entertainment industry.
Mentioning Jodie Whittaker's casting as the first female Doctor in Doctor Who, she joked: "I think Jodie is the perfect choice... if anyone has experience fighting off grotesque monsters, it's an actress."
Many of the guests wore badges on the red carpet in support of the Time's Up movement.