Glastonbury fell Crazy In Love with Beyonce as the American superstar brought the festival to a close in "unforgettable" fashion.
More than 50,000 fans crammed on the famous muddy hill screamed in unison as she declared: "This is my dream."
Arriving on stage 10 minutes late in typically diva-like fashion, a celebrity-packed audience sang along as she started proceedings with Crazy In Love.
She was later joined on stage by Tricky for smash hit Baby Boy.
At the beginning of the set she appeared silhouetted against a white triangle of light and the crowd went wild.
Beyonce had arrived on stage and as she sashayed down the stairs, any doubts about a pop act headlining Glastonbury were blown away.
The triangle went red and there was a burst of fireworks.
Wearing a low-cut gold sequinned top, which split to reveal a pair of black knickers, the 29-year-old told the crowd: "I want you all to know right now you're witnessing my dream. I want to thank you from the bottom of my heart for having me and my band tonight. I always wanted to be a rock star and tonight we are all rock stars.
"I want you to forget about your worries, forget about your troubles. I want you to get lost in this music tonight."
The set included a version of Alanis Morissette's You Oughta Know, which saw Beyonce striding across the stage, and there was also a nod to the Eurythmics' Sweet Dreams.
With the set slowing down, she performed a balladic version of Kings of Leon's Sex On Fire.
Husband Jay-Z was in the crowd watching. The rapper was a controversial choice when he headlined in 2008. And Beyonce said watching him perform had inspired her to appear at the festival.
Jay-Z could be seen with Coldplay frontman Chris Martin's wife, Gwyneth Paltrow. Beyonce had a big fan in Coleen Rooney, who posted a picture of herself with Jay-Z on Twitter. She told her followers: "Beyonce made Glastonbury for me!!!"