LOS ANGELES — Daft Punk has gotten lucky at the Grammys.
The French electronic duo won record of the year at the awards show, beating hits like "Blurred Lines" and "Royals." The song features Pharrell Williams and Nile Rodgers. Daft Punk, who wear helmets in public, also picked up honors for best dance/electronica album for "Random Access Memories" and pop duo/group performance.
"Well, I suppose the robots would like to thank...." joked Williams, who won non-classical producer of the year. "You know honestly, I bet, France is really proud of these guys right now."
Lorde's popular hit won record of the year and best pop solo performance.
"Thank you everyone who has let this song explode because it's been mental," she said.
Lorde and Daft Punk are still behind Macklemore & Ryan Lewis, who won four Grammy Awards so far Sunday, including best new artist and rap album for "The Heist," beating efforts from Kendrick Lamar, Jay Z, Kanye West and Drake.
"Wow, we're here on the stage right now," said Macklemore, thanking fans first, then his fiancee and team. "I want to say we made this album without a record label, we made it independently and we appreciate all the support."
Beyonce kicked off the Grammy Awards with a steamy and smoky performance of "Drunk In Love:" She started on a chair and then grinded in a revealing black outfit. Jay Z emerged in a fitted suit to rap his verse, and the couple — parents of little Blue Ivy — held hands and danced together.
Imagine Dragons and Kendrick Lamar collaborated onstage to create an electrifying performance, as the acts sported all-white and went from rap song to rock song. Robin Thicke performed with Chicago, singing the group's songs before going into "Blurred Lines," which energized the crowd. Thicke finished the performance singing on the floor.
Katy Perry sang "Dark Horse" in an eerie forest with fire that mirrored the song's vibe, and John Legend and Taylor Swift — who whipped her head, and hair, back and forth — played pianos during their slow songs. Pink twirled in the air in her signature Cirque du Soleil-form.
Swift, who is nominated for album of the year, lost best country album in a surprise upset to rising singer-songwriter Kacey Musgraves.
"Oh my goodness. Oh my god. I can't even. I can't even," said a teary-eyed, but happy Musgraves, whose "Same Trailer Different Park" won the honor. "I got to make a record that I poured myself into and I'm so proud of."
The singer also beat Swift for best country song and was nominated for new artist.
Macklemore & Lewis' wins, which include best rap song and rap performance for "Thrift Shop," come after the Grammy rap committee almost ousted the group from its categories. A source told The Associated Press that the rap committee rejected the duo, but that was later overruled by the general Grammy committee. The rap committee felt Macklemore & Lewis should qualify for the pop awards instead because of their massive success on Top 40 radio. The source, who attended the general Grammy meeting, spoke on the condition of anonymity because the meeting was private.
Macklemore & Lewis are also nominated for album of the year.
Justin Timberlake, who isn't up for any of the major awards, won three trophies, including best R&B song for "Pusher Love Girl" and music video for "Suit & Tie," which also earned Jay Z a Grammy. Jay Z and Timberlake also won best rap/sung collaboration for "Holy Grail."
"I want to thank God — I mean a little bit for this award — but mostly for all the universe for conspiring and putting that beautiful light of a young lady in my life," Jay Z said, looking at Beyonce. "I want to tell Blue that, look, 'Daddy got a gold sippy cup for you.'"
Like Macklemore & Lewis, Lamar is nominated for album of the year, marking a high note for hip-hop. Outkast and Lauryn Hill are the only two rap performers to win the coveted album of the year; Hill and Arrested Development are the only rap-based stars to take home best new artist.
A rapper has never won song or record of the year.
Jay Z, keeping up the decade-long Grammy tradition of rappers leading in nominations, was the night's front-runner with nine.
For top album, Macklemore & Lewis and Lamar's platinum-selling debuts, "The Heist" and "good kid, m.A.A.d city," will battle Swift's earth-shattering sales force "Red," Daft Punk's electronic adventure "Random Access Memories" and the surprise nominee — "The Blessed Unrest" from the piano-playing Bareilles.
Mars won best pop vocal album with his sophomore release, "Unorthodox Jukebox."
"Ma, I know you're watching. I hope you're smiling. I love you very much," said Mars, remembering his mother, who passed away last year. Mars' father attended the awards show.
McCartney, engineer Bob Ludwig and gospel singer Tye Tribett are double winners. Imagine Dragons and Rihanna also picked up trophies.
LL Cool J is hosting the 56th annual awards, airing live on CBS.
AP writers Chris Talbott, Nekesa Mumbi Moody and Beth Harris contributed to this report.