LOS ANGELES — In a ceremony that honored a wide range of musical styles, Mark Ronson and Bruno Mars walked off with the top prize of Record of the Year for “Uptown Funk” at the 58th Grammy Awards Feb. 15, while Taylor Swift’s “1989” won Album of the Year and Ed Sheeran’s “Thinking Out Loud” was named Song of the Year.

Ronson and Mars’ “Uptown Funk” also won Grammys for best pop duo/group performance and best re-mixed recording.

“This is dedicated to the fans right here,” Mars told the crowd at Staples Center. “We wouldn’t be here if it wasn’t for the people out there dancing to this song.”

For Swift, “1989” was her second career Album of the Year prize. She also won the award in 2010 for “Fearless.”

“I want to thank the fans for the last 10 years and the Recording Academy for giving us this unbelievable honor,” Swift said.

Swift offered words of encouragement to women to beware of people who might try to take advantage of their success.

“As the first woman to win Album of the Year at the Grammys twice, I want to say to all the young women out there: 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, but if you just focus on the work and you don’t let those people sidetrack you someday when you get where you’re going, you’ll look around and you’ll know it was you and the people who love you who put you there, and that will be the greatest moment in the world,” she said.

The album also won best pop vocal album, and she and Kendrick Lamar shared the prize for best music video for “Bad Blood.”

Sheeran and co-writer Amy Wadge took home the coveted Song of the Year Grammy for penning his hit, “Thinking Out Loud.”

“We wrote it on a couch in my house after having dinner,” Sheeran said. “Quite odd.”

He gave special thanks to his parents, who were in the audience, saying they come to the show every year.

“Every time I lose they go, ‘Maybe next year,’” he joked, holding up the award.

Compton native Kendrick Lamar was the top nominee heading into the Grammys with 11. He wound up winning Best Rap Album for “To Pimp a Butterfly,” Best Rap Performance and Best Rap Song for “Alright” and Best Rap/Sung Collaboration for “These Walls.” He also shared a Grammy with Taylor Swift for his feature role on her hit “Bad Blood,” making him one of the top winners of the night.

Alabama Shakes was honored for Best Rock Performance for “Don’t Wanna Fight.”

“When we started this we were in high school … we just did it for fun,” singer/guitarist Brittany Howard said. “We never thought we’d be getting any awards or recognition like this. My heart is beating a mile a minute. This is beautiful, and I promise we’re going to keep going,” she said.

The band received Grammys during the pre-telecast portion of the awards for Best Rock Song for “Don’t Wanna Fight” and Best Alternative Music Album for “Sound & Color,” which also won for Best Engineered Non-Classical Album.

Meghan Trainor was named Best New Artist, and she fought back tears as she struggled to thank a list of supporters, including her mom and dad.

“I have to go cry. Thank you to the Grammys. I love you so much,” she said.

Chris Stapleton, who took home four Country Music Association Awards last year, won the Grammy for Best Country Album for “Traveller.”

Former President Jimmy Carter was a notable standout on the list of Grammy winners during the pre-telecast ceremony. Carter won in the Best Spoken Word Album category for “A Full Life: Reflections at Ninety.”

During the ceremony, the surviving members of the Eagles joined with Jackson Browne to perform “Take It Easy,” in tribute to band co-founder Glenn Frey, who died Jan. 18.

Surviving members of Earth, Wind & Fire honored founder Maurice White, who died Feb. 3, while they presented the award for Album of the Year. White was also honored with a performance by Stevie Wonder and Pentatonix. Earth, Wind & Fire is being recognized by The Recording Academy with a lifetime
achievement award this year.

Lady Gaga, meanwhile, performed a theatrical medley of hits by David Bowie, who died Jan. 10. Chris Stapleton and Bonnie Raitt performed in tribute to blues legend B.B. King, who died May 24, 2015.

The Broadway cast of the hip-hop musical “Hamilton” performed live from New York, marking the first time the Grammy ceremony has featured a Broadway musical performance. Not surprisingly, the cast later won the Grammy for Best Musical Theater Album.

The cast burst on stage at the Richard Rodgers Theatre on Broadway to accept the honor, with the show’s writer and lead performer, Lin-Manuel Miranda, delivering an energetic rap to thank the cast and crew.