It was a good night for “Breaking Bad,” “Modern Family” — and Liberace.

The outgoing AMC drama “Breaking Bad” — which ends its series run a week from tonight — won best drama series, while it was a fourpeat for best comedy series for ABC’s “Modern Family.” “This may be the saddest Emmys of all time, but we could not be happier,” said “Modern Family” co-creator and producer Steven Levitan.

In terms of sheer hardware, however, HBO’s “Behind the Candelabra” proved to be the big winner at the 65th Emmy Awards on CBS on Sunday night, with 11 trophies. The biopic about the flamboyant and secretly gay pianist Liberace and his love affair with a younger man won eight trophies last week at the Creative Arts Emmys, and three more Sunday night, including best miniseries or movie, director for Steven Soderbergh and lead actor in a movie or miniseries for Michael Douglas, who played Liberace.

Douglas delivered an innuendo-laced speech, much of it directed at co-star Matt Damon, who played his lover in the movie. Douglas said he couldn’t have won without Damon and drew laughter from the audience when he spoke to Damon from the stage and said: “You really deserve half of this. So do you want the bottom or the top?”

Levitan’s remark referenced the somber tone, set by the decision to stage five memorial moments for high-profile actors who died in the last year.

With tears streaming down her face, Edie Falco remembered her “Sopranos” husband, the late James Gandolfini, saying he was nothing like the mobster he played on the hit HBO series. “Jim was really quite different,” said Falco, who played the long-suffering Carmela to his Tony. “He had tremendous warmth and heart.” She said that while Gandolfini’s many fans had trouble separating him from his on-screen persona, she said she “was lucky enough to know Jim the man.”

Also honored in such a manner was “All in the Familys’ ”Jean Stapleton, comic legend Jonathan Winters and “Glee’s” Cory Monteith, who died of a drug overdose last summer. Some had questioned whether Monteith deserved such a singling out.In addition, there was also the traditional “in memoriam” tribute, which featured the likes of Larry Hagman and Jack Klugman.Also contributing to the solemn tone of the night: Henry Bromell's posthumous win for writing for a drama series for Showtime's "Homeland," andSir Elton John honoring the late Liberace with a piano number called "Home Again."

“House of Cards” and “Homeland” nabbed top trophies Sunday night. Netflix’s political drama “House of Cards” won for directing in a drama series, and Claire Danes picked up her second trophy in a row for lead actress in a drama for playing the unhinged agent in Showtime’s “Homeland.”

In another win for "Breaking Bad," Anna Gunn, who plays Walter White’s nagging and widely despised wife, won for supporting actress in a drama. But the actors of “Breaking Bad” didn’t fare as well. Cranston was edged by Jeff Daniels, a surprise winner in the lead actor category for HBO’s “The Newsroom.” And Aaron Paul lost supporting actor to Bobby Cannavale, who won for “Boardwalk Empire.”

In other wins, the trophy for supporting actress in a miniseries or movie went to veteran Ellen Burstyn for USA’s “Political Animals.” The 84-year-old comic legend Bob Newhart, who received his first ever Emmy for his guest starring role on “The Big Bang Theory,” received a standing ovation and cheers from the crowd. Jim Parsons won for lead actor in that same comedy series.

Don Roy King won his fourth consecutive win for directing a variety series, “Saturday Night Live.” Tina Fey and Tracey Wigfield won for writing for a comedy series, for NBC’s “30 Rock.” Laura Linney won lead actress in a miniseries for “The Big C: Hereafter.” Gail Mancuso took thestatuette for director for “Modern Family.” It marked only the second time that a woman has won in this category.

Another surprise was NBC’s “The Voice” winning the reality competition series honor. Over the past decade, CBS’ “The Amazing Race” has dominated the category, winning nine times. The award for writing in a variety series went to Comedy Central’s “The Colbert Report.” “The Emmys are so good this year,” Stephen Colbert joked when accepting the award. “The Colbert Report” also won for outstanding variety series, ending “The Daily Show With Jon Stewart’s” long-standing lock on this category.

The Emmy for choreography went to Derek Hough for ABC’s “Dancing with the Stars.” And writing for a miniseries, movie or dramatic special went to Abi Morgan for the BBC America’s “The Hour.” The honor for supporting actor in a miniseries or movie went to James Cromwell for FX’s “American Horror Story: Asylum.”

Two of the funniest moments of the night, oddly enough, came during acceptance speeches — not typically known for yucks. One of the first genuine laughs came with the first award, for supporting actress in a comedy series, which went to Merritt Wever of Showtime’s "Nurse Jackie," who seemed stunned and speechless ... literally.

“Thank you so much,” she said in accepting the award, and then adding: “I gotta go, bye.”

The honor for lead actress in a comedy went to Julia Louis-Dreyfus for HBO’s “Veep,” who was joined on stage by Tony Hale, who plays her personal aide on the show, and helpfully “fed” her acceptance speech lines. Hale also won for best supporting actor in a comedy series.

It was all far funnier than the show’s opening number. Neil Patrick Harris returned as host but the gags fell surprisingly short, although not for lack of star power: Past hosts Jimmy Fallon, Jane Lynch, Jimmy Kimmel and Conan O'Brien as well as Fey and Amy Poehler took turns trading jibes with Harris about the best way to guide TV's biggest night.

Finally, Kevin Spacey brought the laughs with a to-camera delivery familiar to fans of his “House of Cards”: “It’s all going according to my plan.... They couldn't host a child’s birthday party.” While some wondered why Harris passed up the opportunity to do one of his showstopping song-and-dance number, he did break out into sing halfway through the three hour show with a song aptly titled "The Number in the Middle of the Show."