(CNN) -- On a wild night of upsets at the 65th Primetime Emmy Awards, virtually nothing seemed to be going "Breaking Bad's" way.
The AMC series, which concludes its much-lauded run next Sunday, didn't win a lot of honors it was expected to. Bryan Cranston, who was tabbed for outstanding lead actor in a drama, lost to "The Newsroom's" Jeff Daniels. Co-star Aaron Paul, who could have won supporting actor in a drama, ended up watching "Boardwalk Empire's" Bobby Cannavale take home the trophy.
But when it came time for the big prize, outstanding drama, things broke for "Bad."
"Holy crap! I did not see this coming," said creator Vince Gilligan, citing all of the other nominated shows in "this golden age of television" "Bad" felt so fortunate to be a part of.
"This is the answer to a wish and a prayer for me," said Cranston backstage. "I've been blessed in the past and this show has been nominated in the past, but what I really wanted was what we got, to celebrate the win for the writing crew and cast. This is one helluva party, and what a way to go out."
Gilligan paid tribute to Netflix, the service behind another drama nominee, "House of Cards."
"Netflix kept us on the air," he said. "The show would not have lasted beyond Season 2 if not for streaming on demand."
"Breaking Bad's" Anna Gunn also won an Emmy, for outstanding lead actress.
Like "Breaking Bad" itself, which has taken viewers in strange directions over five seasons of turning mild-mannered chemistry teacher Walter White into meth king Heisenberg, the Emmys were anything but predictable.
Oh, "Modern Family" took home its fourth straight Emmy for outstanding comedy, and Jim Parsons won lead actor in a comedy, but even those honors were uncertain after a night in which such shows as "Veep," "The Big C" and "The Voice" won awards over perennial champs. And the Emmys like nothing better than to honor its perennial champs.
As host Neil Patrick Harris said at one point, "This just in: Nobody in America is winning their Emmy office pool."
'I don't know how to feel yet'
The tone was set right away, with best supporting actress in a comedy series going to "Nurse Jackie's" Merritt Wever.
"Thank you so much. Um, I gotta go. Bye," said Wever in her abrupt acceptance speech.
Wever beat out such contenders as "30 Rock's" Jane Krakowski and "Glee's" Jane Lynch.
Backstage, Wever was only slightly less stunned.
"I'm scared, honestly," she said about holding the Emmy. "I'm scared because it was unexpected, so I don't know how to feel yet. I have therapy next week."
Later in the show, Daniels was equally bemused at winning for his performance as a news anchor on "The Newsroom."
"Well, crap. Didn't expect this," he said.
"You're glad to be invited to the party, there are six of us nominated. There easily could have been 10 other guys," he added backstage. "I felt the work stood up to what the other guys were doing, but we're all doing different things, so it's anybody's game to win. I was happy to win, but surprised."
Daniels beat Cranston, "House of Cards' " Kevin Spacey and "Homeland's" Damian Lewis, among others.
"Homeland," last year's drama series winner, did pick up a couple trophies. The late Henry Bromell, who wrote the "Q&A" episode of the show, earned an Emmy for writing, and Claire Danes won the Emmy for actress in a drama series.
'Candelabra' lights up
The closest thing to a sweep came in the miniseries/movie categories, where the HBO film "Behind the Candelabra" won three Emmys on the night, including outstanding miniseries/movie. Also honored: director Steven Soderbergh and star Michael Douglas.
The film won eight Emmys at last week's Creative Arts Emmys, giving it wins in 11 out of its 15 nominations.
Douglas, who played Liberace in the biopic, joked with co-star Matt Damon, who played the pianist's lover, Scott Thorson.
"You deserve half of this," Douglas said, holding up the award. "Do you want the bottom or the top?"
Upsets all around
But, mostly, it was a night for upsets.
"The Voice" beat perennial winner "Amazing Race" for reality-competition program. It's only the second time in 11 years "Amazing Race" hasn't won.
"The Colbert Report" won outstanding variety series and for variety series writing, also beating a perennial winner, "The Daily Show."
"It's an honor to be nominated, but it's more than that -- it's also a lie," said "Colbert" host Stephen Colbert in accepting the variety series Emmy. He thanked "Daily Show" host Jon Stewart, who gave Colbert the opportunity to host his own show.
"Veep" took an early lead on Emmy night, winning acting honors for star Julia Louis-Dreyfus and co-star Tony Hale. Louis-Dreyfus beat "30 Rock's" Tina Fey and "Parks and Recreation's" Amy Poehler, among others.
But it wasn't quite enough to unseat "Modern Family" for comedy series. "Family" also won an Emmy for its directing, which went to Gail Mancuso.
Jokes and tributes
Host Neil Patrick Harris kept things moving, despite uneven material.
"Tonight we celebrate the best in television," he said in his opening monologue. "For younger audiences, that's the thing you watch on your phones."
He also cracked a Paula Deen joke to a groan. "Not soon enough?" he asked.
But Harris rebounded thanks to some winning song-and-dance moves, including a song at the halfway mark called "The Number in the Middle of the Show."
Other Emmy segments went for the heartstrings. Michael J. Fox gave a moving tribute to producer Gary David Goldberg, who hired the actor for "Family Ties." Edie Falco got emotional paying homage to her "Sopranos" co-star, James Gandolfini.
And Bob Newhart, who showed up gnomishly at one point alongside Ernst & Young accountants, received a standing ovation when he was introduced by "Big Bang Theory's" Parsons. Last week at the Creative Arts Emmys, Newhart finally won an Emmy for his guest spot on the show. It was his first Emmy in seven nominations.
"They wrote an awful good script," Newhart said of his "Big Bang Theory" colleagues. "They gave me a lot of hanging curveballs, and I kept swinging at them."
On this night, Emmy mostly threw knuckleballs. But in the end, "Modern Family" and 'Breaking Bad" connected -- and scored.
Alan Duke and David Daniel contributed to this story.