HBO, accustomed to being the undisputed Emmys champ in recent years, found itself in the unusual position of sharing the title Sunday night. FX Networks earned six awards at the Primetime Emmys, matching HBO’s tally for the evening. FX’s surge came largely on the back of anthology series “The People v. O.J. Simpson: American Crime Story,” the evening’s most honored show.

Counting last weekend’s Creative Arts Emmys, HBO held onto the top spot, thanks to another record-breaking haul for “Game of Thrones.” The best drama series winner passed “Frasier” as the most decorated scripted series in Emmy history, with 38 wins. With 12 Emmys this year, the show tied its record from 2015 for most wins by a show in a single season.

The HBO-FX split was one of several surprises Sunday night, among them Rami Malek of USA’s “Mr. Robot” winning the award for best actor — his first nomination in the show’s first season. Accepting the award, Malek said, “Please tell me you’re seeing this, too.”

Malek was followed by Tatiana Maslany of “Orphan Black,” who won for her work on BBC America’s “Orphan Black.” Maslany is a longtime critical and fan favorite for her work on the BBC America sci-fi series, in which she has played more than half a dozen characters. She drew her first nomination last year for the show’s third season.

On the comedy side, change yielded to consistency, with “Veep” winning its second straight award for best comedy series, Julia Louis-Dreyfus winning her fifth straight best-actress award for her work on the show, and Jeffrey Tambor winning his second consecutive best-actor award for “Transparent.”

Toward the end of the night, FX and HBO each missed out on opportunities to jump ahead of the other with losses in key dramatic acting categories. “Game of Thrones” came up empty-handed in supporting actor and actress categories, in which it had multiple nominees who likely cannibalized votes from one another. Emilia Clarke, Lena Headey, and Maisie Williams lost out to third-time winner Maggie Smith of “Downton Abbey.” Peter Dinklage and Kit Harington lost to Ben Mendelsohn of Netflix’s “Bloodline,” which was canceled last week.

FX’s “The Americans,” meanwhile, was shut out in the highest-profile drama-series categories. After not being nominated for its first three seasons, the show this year earned a nod for best series as well as for lead actress Keri Russell and lead actor Matthew Rhys.

FX’s big night began with a win for Louie Anderson for best supporting actor in a comedy series. Anderson won for his work playing the mother of Zach Galifianakis’ character on FX’s “Baskets.” From the stage, Anderson thanked his mother, shouting “Mom, we did it!” Backstage, he explained that the character was based in large part on his mother.

A string of victories for “The People v. O.J. Simpson” in the limited series and movie categories followed shortly thereafter. Sterling K. Brown won for best supporting actor, besting castmates John Travolta and David Schwimmer, and Courtney B. Vance won out over cast mate Cuba Gooding Jr. Sarah Paulson, who won for playing prosecutor Marcia Clark, brought her with her to the Emmys as a guest, and addressed her from the stage when accepting her award. She noted that her motivation in playing Clark was largely correcting a public perception about the prosecutor, who was treated harshly by the media at the time of the O.J. Simpson murder trial.

“I, along with the rest of the world, had been superficial in my judgment, and I’m glad that I’m able to stand here in front of everyone today and say, I’m sorry,” Paulson said. Her win was her first after being nominated for five previous Emmys.

Politics took center stage with Jimmy Kimmel joking in his opening monologue about producer Mark Burnett, the creator of “The Apprentice,” being responsible for the political success of Republican presidential nominee Donald Trump. Burnett, when accepting the award for best reality show, responded by joking that Kimmel and ABC had just given Trump five more minutes of free TV time.

Julia Louis-Dreyfus when accepting the award for best actress in a comedy, deadpanned that “Veep” had taken down the wall between comedy and politics, then promised “to rebuild that wall and make Mexico pay for it.” Sterling K. Brown, accepting his award for best supporting actor in a limited series or movie, joked about asking Melania Trump for speech advice. John Oliver, who has been arguably the most effective critic of Trump in late night during this election cycle, won the Emmy for variety-talk series for his HBO show “Last Week Tonight.” Comedy Central’s “Key and Peele” won the first-ever award for variety-sketch series.

Fielding press questions backstage after accepting his show’s award, “Veep” showrunner David Mandel expressed exasperation with being asked questions about the presidential election — then took aim squarely at Trump.

“There are days when things we think of pale in comparison to that madman threatening Hillary Clinton not once but twice,” Mandel said. “If I wrote that, I’d get fired by HBO.”

But the most scathing criticism of Trump came from “Transparent” creator Jill Soloway, who won the award for best director. Discussing her show’s pushing of boundaries for transgender people backstage after accepting her award, Soloway likened Trump’s rhetoric about minority groups to that which took place in Nazi Germany, where Jews were, as she put it “otherized” by Hitler.

“Right now Donald Trump is doing the same thing,” Soloway said. “He’s otherizing people; he calls women pigs if they don’t look like beauty pageant contestants; he blames Muslim and Mexicans for our problems; he makes fun of disabled people, this is otherizing with a capital O. It has been used in our history before to start and win wars.”

The two wins for Amazon’s “Transparent” brought transgender rights front and center at the Emmys for the second straight year. Possibly referencing the recent controversy over Matt Bomer playing a transgender woman in director Mark Ruffalo’s upcoming feature film “Anything,” Tambor said in his acceptance speech, “I would not be unhappy if I were the last cisgender male to play a transgender female on television.”

Appearing later in the show to present, Laverne Cox, transgender star of Netflix’s “Orange is the New Black,” said “I want to echo what Jeffrey Tambor said. Give trans talent a shot.” Cox will become the first trans actress to be a series regular on broadcast television this season with the premiere of CBS’ “Doubt.”