Fantasy saga Game of Thrones took home the top drama prize for the fourth time at the Emmy Awards on Sunday and became the most-decorated fictional show in the awards’ history, but it was British writer and actor Phoebe Waller-Bridge who stole the show with her dark comedy, Fleabag.

Game of Thrones won 12 awards for its final season, including Peter Dinklage who won best supporting actor for the fourth time.

“This all started in the demented mind of George R.R. Martin,” said Game of Thrones producer David Benioff, thanking the author whose novels formed the basis of the HBO series.

But the blood-soaked epic’s hopes of going out with a new record for a single season were dashed after it failed to convert nominations in directing, writing, and the other acting categories.

In the night’s biggest shock, Fleabag star Phoebe Waller-Bridge beat eight-time acting winner Julia Louis-Dreyfus for best actress in a comedy, before the show itself won for best comedy series.

The BBC show – which has grown into a phenomenon on both sides of the Atlantic after being bought by Amazon – also scooped awards for Waller-Bridge for best comedy writing and directing.

“It’s just really wonderful to know and reassuring that a dirty, pervy, angry, messed-up woman can make it to the Emmys,” Waller-Bridge said, referring to the show’s main character.

Fleabag was shunned by Emmy voters last year when it failed to bag a single nomination. But the Television Academy’s 24,000-plus voters changed their tune for the show’s second season.

Waller-Bridge has ruled out a third season, saying the irreverent series about a young Londoner had reached “a natural end”.

Phoebe Waller-Bridge, left, Sandra Oh, centre, and Jodie Comer, right, arrive for the Emmy awards in California [Mike Blake/Reuters]

Upsets

Billy Porter made history as the first openly gay African American man to win the best drama actor prize for FX show Pose, which explores New York’s underground ballroom culture in the 1980s.

“I am so overwhelmed and so overjoyed to have lived long enough to see this day,” said Porter, who turned 50 on Saturday, in his acceptance speech.

Best drama actress went to British actress Jodie Comer who was honoured for her role as an assassin Villanelle in the drama Killing Eve. She was up against costar Sandra Oh, who received a Golden Globe for her role and would have been the first actress of Asian descent to win an Emmy in the category.

“My mum and dad are in Liverpool and I didn’t invite them because I didn’t think this was going to be my time,” Comer said after saluting Oh. “One, I’m sorry, two I love you,”

The auditorium erupted in cheers when Jharrel Jerome of When They See Us, the Netflix drama about the Central Park Five case, won the best actor award for a limited series movie.

“Most important, this is for the men that we know as the Exonerated Five,” said Jerome, naming the five wrongly-convicted men who were in the audience. They stood and saluted the actor as the crowd applauded them.

The streaming service won 27 awards overall, including best movie for Bandersnatch.

HBO’s Chernobyl won the best limited series honour with the channel collecting a total of 34 awards from Sunday and last weekend’s creative arts ceremony. Amazon picked up 15 awards.