The BBC notched up record audiences for this year’s Glastonbury coverage, the corporation has said.

Almost 21 million people (20.9 million) watched small-screen coverage of the festival for at least three minutes, an increase of 12% on 2016.

The Sunday evening programme, which featured Ed Sheeran’s headline set, won a record high audience for a Glastonbury programme of 2.9 million and a peak of 4.1 million viewers, replacing previous record holder Jeff Lynne’s ELO last year.

Ed Sheeran (Yui Mok/PA)

BBC radio and music director Bob Shennan said: “We’re delighted that this year’s Glastonbury Festival has been enjoyed by a record number of people.

“BBC Music was able to bring audiences such an incredible range of genres from grime, reggae, rock and pop to memorable sets including Ed Sheeran, who made his Glastonbury debut only six years ago on the BBC Music Introducing Stage, and legendary artists Radiohead, the Foo Fighters and Barry Gibb. And all under a shining sun for a change.”

BBC iPlayer requests for live streams also went up.

Barry Gibb was a popular booking (Ben Birchall/PA)

The legends slot, this year featuring Barry Gibb, also had a record audience of 2.48 million and a peak of 3.7 million.

BBC Two’s headline sets with Radiohead and Foo Fighters had average audiences of 811,000 and 1.6 million.

On Tuesday Sheeran urged people to look up “loop station” online after he was accused of using a backing track during his set.