Ed Sheeran divided Glastonbury festivalgoers and viewers with headline set

Ed Sheeran (Dominic Lipinski/PA)

Ed Sheeran's headline set at Glastonbury appeared to divide viewers – with some saying he "killed it" but others complaining that his act was not worthy of the slot.

The Eraser singer closed this year's festival with a performance on the Pyramid Stage on Sunday night.

He reeled out a string of hits such as Castle On The Hill and The A-Team, to high praise from many fans on social media.

Many dubbed him a "legend" and pal Saoirse Ronan appeared to be enjoying his set as she filmed him on her phone from the crowd.

Ed Sheeran (Dominic Lipinski/PA)

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

However, Sheeran's guitar skills did not please everyone, with some music fans calling his performance "middle of the road".

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

Some fans suggested that Nile Rodgers and Chic, who were on the Pyramid Stage earlier in the evening and dazzled the crowd with 70s disco classics, were too tough an act for Sheeran to follow.

The 26 year old singer had admitted to battling the nerves as he stepped out on the Pyramid Stage, but wrapped up by showing off his guitar skills in a dazzling performance of You Need Me, I Don't Need You to the huge crowd.

He thanked Glastonbury for having him and said of headlining: "I would like to say it was a dream of mine.

Ed Sheeran performs on stage (PA)

"But I never thought I would even get to the point where I was playing this stage, let alone headlining it."

During his set, Sheeran performed a string of his hits including Castle On The Hill, Lego House and Shape Of You.

In his final moments on stage, he pulled out his mobile phone and asked the crowd to smile, taking a quick picture before carrying on singing.

Sheeran's performance brought to an end to three days of musical performances.

Highlights on Sunday included Nile Rodgers and Chic, who brought some 80s magic with disco hits such as Everybody Dance, I Want Your Love and Upside Down.

Singer Rag 'N' Bone Man delighted fans with twists on some of his biggest hits, as well as an unexpected rap performance.

Nile Rodgers and Chic (Ben Birchall/PA)

Other acts over the three days included Lorde, Major Lazer, Craig David, Foo Fighters, Kaiser Chiefs, Emeli Sande and The Killers, who returned to Glastonbury after 10 years with a surprise set on Sunday evening.

Radiohead were among the big name acts, headlining on opening night.

Katy Perry performed on the Pyramid Stage and told the Glastonbury crowd that she felt being included in the line-up had made her cool.

The Teenage Dream singer also thanked festival-goers for turning out to see her, admitting that she had not been sure whether she still had such a large fan base.

She said on stage: "This makes me feel cool… I never feel cool. Am I cool yet?

"Thanks for coming, I wasn't sure if you still liked me."

Katy Perry performing on the Pyramid Stage at Glastonbury (Yui Mok/PA)

Actor Johnny Depp made his second Glastonbury appearance as he joined Kris Kristofferson for a live performance on the Pyramid Stage.

His fellow Hollywood stars Brad Pitt and Tilda Swinton delighted film fans as they staged a late-night "premiere" for upcoming movie Okja at the festival.

Labour leader Jeremy Corbyn also had a place at the festival, where his image appeared on fans' flags, T-shirts, leggings and necklaces.

Johnny Depp at Glastonbury (Ben Birchall/PA)

He addressed thousands of fans, many wearing T-shirts bearing his name, at the event's Pyramid Stage and Left Field Tent, met festival founder Michael Eavis and enjoyed a vegan lunch at the Greenpeace area.

This year's event saw many pay tribute to victims of both the recent terror attacks and the Grenfell Tower fire.

Liam Gallagher led the crowd in an a capella singalong of the Oasis hit Don't Look Back In Anger as he rounded off his set on The Other Stage on Saturday afternoon.

He told his packed audience: "This next song, last song, is to the people who were killed in the Manchester attacks, in London, and in the Grenfell Tower. So if you know the words, join in."

Chic's Nile Rodgers said he had been in the UK for 10 days and that it had been "inspirational".

"You guys have been f****** unbelievable," he said as he performed on the Pyramid stage.

He also praised the "unreal spirit" of those who had volunteered after the tower fire.

Stormzy took to the stage in a T-shirt emblazoned with a heart-shaped logo reading "Grenfell".