Glastonbury is a festival of music and paradoxes. It's a new-age hippie camp in the countryside with a £28 million (Dh164m) turnover and a £1m "super-fence" to keep out gatecrashers. It's celebrated for its quasi-spiritual moments of rustic intimacy, but is the metropolitan media event of the season. It's a renowned bastion of social conscience and environmentalism, with a corporate brand presence much like any other festival.
And this year, Glastonbury was the world's biggest rock festival, headlined by the world's biggest pop star. Beyoncé's closing headline show on Sunday was one of immaculate physical perfection, performed to people who had been living, eating and sleeping in a field, without being able to wash for five days - fans who would probably have loved to try to join in the Single Ladies dance if only they could lift their mud-crusted wellies off the floor.
The announcement of Beyoncé as headliner may have raised a few eyebrows - it's difficult to imagine Madonna being booked alongside Van Morrison or Elvis Costello in the 1980s - but it was her husband Jay-Z who had already fought and won the battle against the guitar purists, with his headline performance in 2008 putting paid to Noel Gallagher's chauvinistic whine that "hip-hop at Glastonbury [is] wrong". Glastonbury is not just a music festival, with vast areas devoted to theatre, circus arts, comedy, political debate, alternative medicine, and, ahem, glass-blowing, and it's not just a rock festival - as the numerous dance stages and show-stopping performances from acts as diverse as Omar Souleyman and Wu-Tang Clan demonstrated throughout the weekend.
Beyoncé was a diva in a place where it's really not easy to be a diva. As her elaborate pyramid stage set was prepared, and the sun went down over the Vale of Avalon, Beyoncé's crew seemed to include someone polishing the stairs she would soon walk down. It's difficult to imagine her ambling slowly onstage and mumbling an apology about having a bit of a sore throat, as Paul Simon had done earlier that afternoon. Meanwhile, a hundred-odd thousand people were trying to squeeze closer to the stage, tripping over empty cardboard cups, fold-up camping chairs and dusty rugs.
Finally, 20 minutes later than billed, the stage lights dimmed and Beyoncé appeared silhouetted in front of a white pyramid, slowly singing the refrain from Crazy in Love, before walking down the polished steps, in a typically eye-popping gold outfit. Then, suddenly fireworks filled the sky above the stage, there were lights, trumpets, and the song exploded into life. It was every bit as spectacular as the situation - and her stardom - demanded.
"I want you to know, that tonight, you are witnessing my dream. I always wanted to be a rock star!" she exclaimed to rapturous cheers as the opener finished. "Tonight, we are all rock stars: forget your worries, forget your troubles, I want you to get lost in this music tonight. I want to make beautiful memories, and be free tonight." It was cheesy as anything, and you got the feeling that in different circumstances some of the crowd might sneer, or at least smirk - but after you'd endured several days of ghastly mud-baths, losing wellies in the muck, tripping over guy ropes in the rain and wondering why you paid several hundred pounds for the privilege of abandoning your sofa for a damp tent, this was the most desperately needed redemption imaginable. I saw many grown men punch the air at this point, without a modicum of self-consciousness.
She moved into Single Ladies, which also had this colossal Glastonbury crowd - from kids to their middle-aged parents - singing along, finishing with a few rock flourishes; several songs were subtly reworked for the live setting with extra guitar or sax solos, but never overplayed. It was, quite simply, the perfect pop show, and you'd have to be pretty churlish not to let yourself get caught up in the delirium of mass festivity.
One dissenter in a group of eight or so teenagers standing near to us was met with a superb put-down. Presumably responding to a previous comment, a girl who had been singing along throughout the show turned to a surly-looking boy with a wispy almost-moustache and a curled lip beneath it. "Listen!" she said, wagging her finger at him, perhaps channelling some of the energy from Run the World (Girls) and Independent Women, "It's your fault that you're not enjoying this because you're refusing to engage with it." She must have been no older than 14. Her school friend looked chastened and tried to slink back behind his moustache, with limited success.
Starting with your two biggest hits is a sure-fire way to get everyone on your side, but it's also remarkably audacious. Yet somehow she didn't lose the crowd for a moment, with masterful showmanship and audience participation throughout. A mid-set medley of Destiny's Child hits and the Lady Gaga duet Telephone went down brilliantly, and the covers were perfectly picked for a rock crowd singalong, including Alanis Morrissette's You Oughta Know. With the right preparation and encouragement, Irreplaceable was sung almost entirely by the crowd, Beyoncé beaming with her mic outstretched to the singing masses.
Her ballad-heavy new album provided respite from the eye-popping dance routines. "When the world's at war, all we need is love" she says before an intense performance of 1+1, kneeling atop an all-white piano, her extraordinary voice carrying far into the cloudless night sky. Female empowerment aside, being pro-love and anti-war is normally as explicitly political as Beyoncé gets. But on this occasion a cover of Etta James's At Last is accompanied by a big-screen montage, charting the history of the American civil rights movement and ending with Barack and Michelle Obama slow-dancing at the US president's inauguration ball. The video seems a bit trite, but the vocal performance is breathtaking, and the crowd cheer both enthusiastically.
It may swim against the tide of global recession and austerity, but Beyoncé's schtick is about abundance: of vocal extravagance, of dancers, of glamour - as her extraordinary performance of Run the World (Girls) at the recent US Billboard Music Awards demonstrated. But even though mud and bling do not make obvious bedfellows, her opulence could not be better placed - the world's biggest pop star demands the world's biggest audience. Doing a head count would have been a challenge in the circumstances, but as the closing track Halo started up, there were tens of thousands of hands in the air in front of me, to the left and right of me, and who knows how many more to the rear all the way up the hill behind. Some music sounds best in an intimate club, where you can see the whites of the singer's eyes, and some historic gigs are legendary because they took place before minuscule audiences. That's not how Beyoncé works and that's not how her brand of pop works.
"I've done a lot of things in my life, but never before have I played to 175,000 people," she said, beaming again, and everyone was enjoying it so much no one wanted to mention that fifty-odd thousand of them were probably at other stages at that moment, watching Queens of the Stone Age or The Streets. Halo was the ideal rousing emotional singalong to close the set, and Beyoncé adapted this irresistibly catchy love song to be a paean to the friendship and solidarity of the festival's collective experience: "Glastonbury I can see your halo". As the emphatic handclaps of an entire city's worth of people filled the night sky, a forgivably cheesy montage played, showing tired, happy revellers traipsing through the mud, persevering in spite of it all. It's at times like that it bears remembering why "pop" is short for "popular".