The singer performed hit after hit on the Pyramid stage.
Sir Elton John has thanked fans after his headline set at Glastonbury, saying they will be in his “heart and soul forever”.
The superstar brought the festival to a close on Sunday night with his headline set on the Pyramid stage, which included crowd-pleasing hits such as Your Song, Tiny Dancer, Rocketman and Benny And The Jets.
He wrote on Instagram: “Thank you Glastonbury! The energy last night was like nothing else, and I couldn’t be more grateful to the crowd and the people watching at home for all your love and support.
“You will be in my heart and soul forever.
“UK, what a farewell. I love you.”
Sir Elton’s highly anticipated set was billed as his final UK show before he retires from touring at the end of his Farewell Yellow Brick Road tour.
He treated fans to hit after hit during a “special and emotional” two-hour set.
He also surprised the crowd with unexpected musical guests, putting paid to rumours of big names and famous collaborators.
He told festivalgoers: “I never thought I would ever play Glastonbury and here I am.
“It’s a very special and emotional night for me because it might be my last show ever in England, so I had better play well and I had better entertain you.
“You’ve been standing there so long and I really appreciate all the outfits and everything.”
Instead of collaborators such as Dua Lipa and Britney Spears, Sir Elton was joined by friends and musicians he admires, starting with Jacob Lusk of Gabriels, who came on stage for Are You Ready For Love?
He was joined by US singer Stephen Sanchez to perform Sanchez’s song Until I Found You, while The Killers frontman Brandon Flowers came out for Tiny Dancer.
His final guest was Japanese-British singer Rina Sawayama, who performed Don’t Go Breaking My Heart.
Sir Elton paid tribute to late star George Michael as he launched into Don’t Let The Sun Go Down On Me and closed the show with Rocketman, the song that lent its name to his biopic, with Taron Egerton playing the singer.
On Monday, revellers were making their way home from Worthy Farm as festival organisers urged campers to leave no trace.
A huge clean-up operation was under way, with tonnes of rubbish expected to be collected.
The festival implored music fans to take everything home with them, writing on Twitter: “When you’re packing up your tent, please put your rubbish in the bin bags provided by campsite stewards and take home all of your belongings to use again next time! Thank you. Love the farm, leave no trace!”
Drivers were encouraged to leave the site before 7am on Monday to avoid queues and to have food, drink and supplies in their car in the event of long waits.
Advice for those with cars said: “From 8am until 5pm on Monday there are likely to be queues as our stewards work hard to help all the cars which arrived over three days to leave in one day.
“None of the staff can go home until you have, so please be calm, respectful and understanding.”
Avon and Somerset Police have recorded 120 incidents, a spokesman said.
This included 27 thefts, 20 drug offences and seven sexual assaults.
A total of 35 arrests were made.
The figures include incidents and arrests both on and off site, in areas around the perimeter and on approach roads and in the car parks.
The Met Office said the closest weather station to Glastonbury at Yeovilton, Somerset, saw temperature highs of 26.1C on both Saturday and Sunday.
The national weather service said festivalgoers making their way home on Monday could see a few “sporadic” light showers that will be “quite hit and miss”.
A spokesperson told the PA news agency: “There’s some cloud in the area today and temperatures are much more subdued than those seen through the weekend.”