LONDON — Shawn Mendes beat Taylor Swift and Ed Sheeran to win the best-artist prize Sunday at the MTV EMAs, while U2 were proclaimed global icons in a show that celebrated London’s diverse culture, from pubs to pirate radio.

Mendes, the 19-year-old Canadian star, also won the best-song trophy for “There’s Nothing Holdin’ Me Back,” to the delight of fans standing in a polite onstage mosh-pit at the city’s SSE Arena. Fittingly, he also took the prize for best fans.

The show, formerly known as the MTV Europe Music Awards, opened with a clip of Eminem performing his new single “Walk on Water” in a London pub. He then emerged onstage in jeans and a black hoodie to perform the slow-burning number live, with Skylar Gray filling in on the duet duties BeyoncĂ© performed on the recording.

Eminem was also named best hip-hop artist, and proclaimed surprise.

“I don’t know how I got this because I haven’t had an album out in a few years,” he said.

Sunday marked the awards’ return to London for the first time since 1996, and locally bred singer Rita Ora was a suitably chipper host. Taking the stage clad in a bathrobe and towel, she kept things moving, changed outfits every few minutes and gamely joshed in video clips with the stars of pirate-radio sitcom “People Just Do Nothing.”

The show featured plenty of visual dazzle, from the 50 dancers accompanying Demi Lovato on “Sorry Not Sorry” and “Tell me You Love Me” to the giant animatronic bird carrying Travis Scott onto the stage.

Singer Camila Cabello, who won the best-pop prize, performed “Havana” with a troupe of dancers dressed as bathing beauties around a realistic projection of a pool. London grime artist Stormzy arrived in a police car and left in a blaze of fireworks after performing the rousing “Big For Your Boots.”

Performers ranged across genres and generations, and included singer-songwriter Kesha, electronic act Clean Bandit, rapper French Montana, rockers The Killers and former One Direction heartthrob Liam Payne.

Kendrick Lamar won best video for “Humble,” a lavish clip laced with religious and art-history imagery.

Coldplay was named best rock act, while the best-alternative prize went to Thirty Seconds to Mars. Frontman Jared Leto thanked Europe, adding that the U.S. is a land of immigrants and “we welcome you with open arms.”

British singer-songwriter Dua Lipa was named best new artist.

Apart from the occasional hint of marijuana smoke wafting across the arena, there were few of the unscripted-feeling moments that made past shows stick in the memory. There was no equivalent of Kanye West crashing the stage after losing in 2006 or Miley Cyrus smoking a joint in Amsterdam in 2013.

U2, who played an MTV-sponsored concert in London’s Trafalgar Square on Saturday, received the Global Icon award from Leto, who said “U2 changed my life.”

“Their songs are prayers, their concerts a church,” he said. “They challenge us, they inspire us.”

The Irish band dedicated the award to label boss Chris Blackwell of Island records, who signed them almost 40 years ago. And in a nod to a new generation of artists, Bono crooned an a capella version of Stormzy’s “Blinded by Your Grace.”

The awards are held in a different European city each year, with winners selected by fans across the continent. Next year’s ceremony will be held in Bilbao, Spain.