Ed Sheeran brought Glastonbury to a close on Sunday night with a set that divided festival goers and commentators alike.

The 26-year-old singer songwriter admitted he was battling nerves as he stepped out on the Pyramid Stage with his guitar, however it wasn't long until the crowd were singing back every word at him.

Ed Sheeran closed the Glastonbury festival 2017

His nerves firmly put to bed, Sheeran performed some of the biggest hits of his career during the set, including Castle On The Hill, Shape Of You and Galway Girl, which he introduced by saying: "I’m going to play a song now that you might not like but I’m pretty sure you know the words to."

Irish trad group Beoga joined Sheeran onstage for a rendition of Nancy Mulligan, a song about his paternal grandmother, which went down a storm with the crowd.

In his final moments on stage, the mega-selling artist took out his mobile phone, snapping a quick picture before carrying on singing.

Reaction to his set has, as expected, been mixed, with some taking to Twitter to applaud his raw talent, while others thought he shouldn't have landed the leading time slot at the legendary festival.

However, others have not been so positive.

Other commentators were confused by the fact that the Shape Of You hitmaker used a loop pedal on stage, accusing him of using a backing track rather than playing live.

Luckily, Ed wasn't short of defenders who came to his rescue.

Irish actress Saoirse Ronan, who starred in Sheeran's Galway Girl video, looked like she was having a ball as she watched the performance in the heaving crowd while filming on her phone.

Sheeran closed Glastonbury on the famous Pyrmanid main stage on Sunday following sets from the likes of Biffy Clyro and Laura Marling.

Haim, Rag 'n' Bone man and Emeli Sande played on The Other Stage while other stages saw performances from Goldfrapp, Kano, Kiefer Sutherland, and Scouting For Girls.

The Pyramid stage was also home to a number of political statements throughout this year's event.

Marking a year since the EU referendum result, British Labour Party leader Jeremy Corbyn delighted crowds on Saturday as he walked on to introduce rap duo Run The Jewels.

There were also sets from Katy Perry and headliners Foo Fighters, who made a triumphant return to the festival two years after they were forced to pull out because of frontman Dave Grohl's broken leg.

The band played a lengthy set that ran to about two hours and 20 minutes, frequently promising the crowd they intended to keep going until they were forced to leave the Pyramid Stage.

Taking festival-goers on a tour of their hits including Best Of You, Monkey Wrench, Learn To Fly, These Days, My Hero and All My Life, the band were accompanied by chants of "10 more songs" and "three more hours".

Grohl opened by thanking Florence Welch for filling in for them two years ago when he broke his leg.

Another of Saturday's performers, Liam Gallagher, paid a special tribute to the victims of the Manchester and London terror attacks, as well as the Grenfell Tower fire, as he performed.

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