Image copyright Getty Images Image caption Stormzy made the transition from underground success to household name in 2017

Stormzy has been named artist of the year at the 2017 BBC Music Awards, capping a hugely successful year.

The south London MC, whose debut album Gang Signs & Prayer was the first grime record to reach number one, beat Ed Sheeran and Lorde to the prize.

He adds it to a collection that already includes three Mobos and the Q Award for best solo artist.

Rag N Bone Man collected album of the year, while Foo Fighters won best live performance for their Glastonbury set.

Media playback is unsupported on your device Media caption Highlights of Foo Fighters' set at Glastonbury 2017

The US band headlined the festival this June, two years after they were forced to pull out when frontman Dave Grohl broke his leg.

Taking to the stage this summer, Grohl blamed the delay on "bad traffic", before launching into a blistering, hit-filled set.

Their performance eventually overran by 20 minutes because the crowd kept singing between songs.

"It really did just turn into this one big ball of love and energy and celebration and music," Grohl said as he collected the BBC Music Award.

"That's what you want every show to be, but when it's on that scale it's a big feeling."

Image caption This year's BBC Music Award winners pose with their trophies

Rag N Bone Man's prize came in recognition of his debut album Human, which is the year's biggest-selling debut.

"That's a proper good award," he said. "I keep thinking at one point that someone is going to fishhook me off and tell me it's a joke, but it's not, and it's a wonderful thing to have."

In previous years, the BBC Music Awards have been handed out at a glitzy televised arena concert, with performances from the likes of One Direction, Little Mix and Robbie Williams.

However, after disappointing ratings (2016's show was watched by 2.7 million people) this year's awards were handed out during a a one-hour BBC Two special titled The Year In Music 2017.

Hosted by Claudia Winkleman and Clara Amfo, it looked at some of the year's biggest music stories, from the One Love concert in Manchester to Black Sabbath's last ever gig.

Stormzy, who self-released his debut album in February, has been one of the year's biggest breakout stars.

The rapper also contributed a heartbreaking verse to the Artists for Grenfell single, and collaborated with the likes of Ed Sheeran, Krept & Konan and Little Mix.

"When I done the song with Little Mix, some people thought that questioned my integrity," he told the BBC Two show. "I was like, 'bro, I rate Little Mix more than I rate some of your favourite rappers.'"

On receiving his artist of the year prize, the star, whose real name is Michael Omari, said: "I'm actually blessed to be able to say that I'm an artist that's managed to be regarded as someone that's worthy of this award.

"I don't know what the future holds for me but I'm definitely ready for it."

Media playback is unsupported on your device Media caption Declan McKenna talks to BBC Breakfast about his award

One final award, for BBC Introducing artist of the year, went to rising star Declan McKenna, whose effervescent indie-pop songs address weighty topics like police brutality, transgender conversion therapy and corruption at Fifa.

The star, who first got played on radio after uploading songs to the BBC Introducing website as a 15-year-old, thanked the organisation "for relentlessly rooting for me throughout the years".

Meanwhile, the BBC has confirmed that its new music programme Sounds Like Friday Night has been commissioned for a second series.

Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.