LOS ANGELES — The 58th annual Grammy Awards on Monday celebrated a young generation of chart-dominating pop stars, with Taylor Swift winning album of the year for "1989" and Kendrick Lamar sweeping the rap categories, even as the show devoted much of its airtime to lionizing musical heroes of decades past.
Although Swift had been nominated for all of the most prestigious categories, the top awards were split fairly evenly among a crop of young stars. Mark Ronson won record of the year for "Uptown Funk," the upbeat, retro dance song featuring Bruno Mars that dominated radio last year and that they played at the Super Bowl. Ed Sheeran, the cherubic British singer-songwriter, won song of the year for his soul-inflected ballad "Thinking Out Loud," sharing the prize with his co-writer, Amy Wadge.
And Kendrick Lamar, the rapper whose complex songs about black identity and racial strife have dazzled critics and become touchstones of the Black Lives Matter movement, took a total of five prizes and delivered a confrontational medley of his songs "The Blacker the Berry" and "Alright."
Accepting her trophy for album of the year, Swift said she was the first woman to win the prize twice and made a statement that was a firm affirmation of her own celebrity, as well as what many viewers interpreted as a response to Kanye West, who recently released lyrics referencing their on-and-off feud.
"All the young women out there," she said, "there are going to be people along the way who will try to undercut your success or take credit for your accomplishments or your fame."
"If you just focus on the work," Swift continued, "and don't let those people sidetrack you, someday you will get where you are going. You'll look around, and you will know that it was you and the people who love you who put you there, and that will be the greatest feeling in the world."
The awards, broadcast by CBS from the Staples Center here, had kicked off with a rush of youth, featuring Swift in a hyper-confident performance her song "Out of the Woods" in a sleek sequined jumpsuit and short bob.
For his performance, Lamar appeared in chains and a blue prison uniform, surrounded by other black men. After a blistering rap, he stood in front of a giant glowing map of Africa marked with the word "Compton."
"This for hip-hop," Lamar said as he accepted the award for best rap album, telegraphing his win as a victory for the genre and also honoring classic rap albums of the past that were not accepted into the Grammy pantheon. "This for Snoop Dogg, 'Doggystyle.' This for 'Illmatic,' this for Nas. We will live forever, believe that."
That followed a performance of the opening number from the hit Broadway musical "Hamilton," whose story of striving and self-reliance mirrored the themes of Lamar's songs. The show's cast recording took the award for best musical theater album.
Sheeran, who in addition to song of the year won best pop solo performance for "Thinking Out Loud," was taking home his first prizes.
Accepting the award for song of the year, Sheeran thanked his parents, "who have flown in for the past four years to come to the Grammys, and every single time I lose, they go, 'Maybe next year.'"
Among the other big winners were the Southern band Alabama Shakes, whose album "Sound & Color" won a total of four prizes, including best alternative album, best rock performance and best rock song for "Don't Wanna Fight."
The Weeknd, the stage name of the Canadian singer Abel Tesfaye — who emerged five years ago as an Internet curiosity and last year reinvented himself as a radio-ready pop star — won two awards: best R&B performance for the song "Earned It" and best urban contemporary album for "Beauty Behind the Madness."
Meghan Trainor won best new artist; she had been nominated for record of the year at last year's awards, though the Grammys' current rules allowed her to be nominated this year. The shaggy-bearded singer-songwriter Chris Stapleton won best country album for "Traveller" and best country solo performance for that album's title track.
But in another Grammy tradition, the show also relied heavily on earnest tributes. John Legend, Demi Lovato, Luke Bryan, Trainor and Tyrese Gibson sang Lionel Richie songs, and Jackson Browne joined surviving members of the Eagles to honor to Glenn Frey. Stapleton, Gary Clark Jr. and Bonnie Raitt performed a sensuous tribute to B.B. King.
In one of the night's most eye-catching moments, Lady Gaga sang snippets of 10 David Bowie songs in just over six minutes, beginning with "Space Oddity" — as digital effects provided by Intel made her face seem like an animated version of the cover of his album "Aladdin Sane" — and continuing through "Changes," "Fashion," "Let's Dance" and "Heroes," among others.
Adele performed a version of her song "All I Ask" that fell short of her usual level of vocal perfection (she later tweeted, "The piano mics fell on to the piano strings" to explain the poor sound), and in another surprise, Rihanna canceled her scheduled appearance, with her representative saying that after a rehearsal earlier in the day, her doctor put the singer on vocal rest because she was at risk of damaging her vocal cords.
Tesfaye appeared in a tuxedo, bow tie and cuff links, dancing to his song "Can't Feel My Face" in a metal cube flashing with bright lights, like a disco in space, before he joined a cellist and pianist for a delicate version of "In the Night."
In addition to album of the year, Swift won pop vocal album for "1989" and best music video for "Bad Blood." (Lamar's five included all four rap awards — "Alright" for best performance and best song, "These Walls" for rap/sung collaboration, and "To Pimp a Butterfly" for best rap album — as well as his role as a featured performer on the "Bad Blood" video.)
The soul alchemist D'Angelo, who came back in late 2014 after a hiatus of nearly 15 years, won two prizes, best R&B song for "Really Love," which he wrote with Kendra Foster, and best R&B album for "Black Messiah."
The electronic producers Skrillex and Diplo, who under the name Jack U had one of the biggest hits last year with "Where Are U Now," featuring Justin Bieber, won both best dance recording for that song and best electronic/dance album.
Accepting the dance recording prize, Skrillex — who has embraced streaming services like Spotify even as those outlets have been controversial with other performers — acknowledged having "an independent team of young people making amazing decisions and changing the way the music business is."
All but eight of the 83 awards this year were given out in a separate, nontelevised ceremony on Monday afternoon at the smaller Microsoft Theater nearby. In recent years the Grammy organizers have tried to jazz up this once dreary exercise — where dozens of prizes are announced in quick succession — to mixed success, with some dazzling musical performances but plenty of no-shows.
When the first award of the day was given out, for best pop vocal album, Swift was not in the room but her producer Jack Antonoff called her from the podium. "We won!" she could be heard shouting through Antonoff's phone, and then she asked about another musician, also apparently absent: "Could somebody who knows James Taylor tell him I love him?"
The awards are given for recordings released from Oct. 1, 2014, to Sept. 30, 2015, and are voted on by thousands of members of the National Academy of Recording Arts and Sciences, who must have credits on at least six commercially released recordings to qualify.
For musicians outside the arena of mainstream pop, the early awards at the Grammys can be a chance to settle scores or acknowledge the importance of the prizes to genres on the margins.
Accepting the award for best blues album, for "Born to Play Guitar," Buddy Guy, the 79-year-old guitarist and singer who started out with Muddy Waters, thanked his record company for not giving up on him.
"At least," he said, "I know the blues is not dead yet."