Kendrick Lamar, a rapper, has ended his Glastonbury headline with a strong protest against the US’s rollback of abortion rights.

The star shouted, “Godspeed for women’s rights!” as blood gushed down his face from the crown of thorns. They judge Christ, not you.”

He repeated the phrase repeatedly with increasing intensity. Finally, he stopped mid-sentence. Before he walked off the stage, he threw his microphone to the ground.

It was a powerful end to a theatrical performance unlike any festival had ever seen.

Lamar, who was awarded a Pulitzer Prize in 2017 for Damn, discussed themes of guilt and greed, loyalty to his band, power, ambition, prejudice, and took on the audience’s problems through an examination of his own.

He was accompanied by 20 dancers as he performed United In Grief, a song that reflects on his 19-year career and the mental issues he has dealt with over several albums.

He stood still behind the mic stand and they lined up behind, each representing an aspect of his personality. He began a nearly-chronological trip through his catalog as they fled.

Highlights include Alright, his heartfelt protest against injustices and police brutality; Humble which is a harsh rant against toxic masculinity; Swimming Pools (Drank), where he discusses his grandfather’s alcoholism.

The star’s inner and outer struggles were reflected in the dancers at every turn. The second verse of N95’s recent single, which addresses wealth disparity, saw all the lights go out and dancers turn flashlights on Lamar, highlighting his unease about fame and fortune.

The show was a heavy dose of concept, but didn’t alienate the audience. Lamar’s vocals, unlike other live rap shows were well-controlled and nuanced. This allowed his lyrics to shine through, which is something that sets him apart from the rest.

The song Savior was the climax. It examines Covid conspiracies and Black Lives Matter, political correctness, his personal flaws, and juxtaposes them with his faith in Christ.

He introduced the song and explained that the message was “imperfection can be beautiful” and that we often lose sight to the humanity of others when we rush to judge.

For Sunday night’s performance, the closing lyrics “Godspeed women’s rights” were added. This was two days after the US Supreme Court reversed the constitutional right of abortion.

Lamar’s introspective and thorny songs made him an interesting choice to headline Glastonbury. He rose to the occasion and delivered a compelling, visceral set that will be remembered for weeks.

British rapper AJ Tracey performed a spectacular Pyramid Stage show of his own Saturday and said that Lamar was one the most important artists of his generation.

He told BBC News that he worked hard, but was also unwavering in his message.

He sees the meaning in everything he does. He stands up for people of color, the poor, and those who are treated unfairly – that’s a huge honor for people.

He said, “When you’re already an excellent rapper, it’s easy for you to be on autopilot.” But, he added, “But when you stand up for something and push a message that makes people love, that’s what makes them love you.”

Festivalgoers looking for something more exciting at the end of a long weekend could opt to go see Pet Shop Boys, a pop royalty performing their greatest hits on The Other Stage.

Its Alright and Vocal’s metronomic grooves turned the field into an enormous rave. Go West, “a song of gay liberation that became football anthem,” Neil Tennant called it, even had the security staff singing along.

They performed West End Girls, their debut single, and closed the night with Being Boring. This was a dedication to the victims of Oslo Pride shooting.

CharliXCX, the pop star Charli, performed a full-throttle show on the John Peel stage. This showcased her ever-expanding repertoire of pop hits, including Boom Clap and I Love It, as well as more recent hits such Gone and New Shapes.

Glastonbury: More

Sunday’s music program is more relaxed than usual, giving revellers a chance to unwind after five days of excessive drinking.

The Pyramid Stage opened with West Yorkshire’s Black Dyke brass band. Dhaka Brakha followed, with his unique blend of Ukrainian folk songs and African rhythms breaking through the morning gloom.

Marko Galanevych, frontman of the band, told BBC that people claim they’ve never heard it like it before. “Most people will say it’s unique, but they like it.”

The band displayed images of the destruction caused by Russia’s invasion during their set – just days following a video message from President Volodymyr Zelesky asking festivalgoers to stand with him.

Jazz legend Herbie Hancock gave a masterclass of cool as morning turned into afternoon. His set was jam-packed with classics such as Cantaloupe Islands and Take Five.

His set was a warm welcome to Diana Ross, who attracted one of the largest crowds for Sunday teatime’s “legend” slot.

She drew on a 60-year-old catalogue to get the crowd dancing and singing along to songs like Baby Love, I’m Going Out, and Upside Down, despite her wobbly vocals.

Glastonbury legends Elbow proved they are the perfect festival band once more, frontman Guy Garvey being powered completely by the milk of human kindness.

He said that there was a time when we thought we would never see you again. This refers to Glastonbury’s two-year hiatus in the Covid-19 pandemic. “We are so happy to be here in the place where love was invented.”

Kacey Musgraves, a US singer, brought Nashville glamour to The Other Stage wearing a mini-dress with a dragon motif and glittering design… though she complained that she was advised to wear mud clothes and ended up with sunburn.

She laughed and pointed at her feet, saying, “These wellies obviously had no purpose.”

She voiced her dismay at Roe v Wade’s overturning, along with Kendrick Lamar and other US acts, over the weekend.

She chuckled, “Honestly thinking about never returning to America.” “Is there any sheep farming job openings?”

The star turned Starcrossed’s artful sorrow into a celebration for freedom musically. For good measure, she even included a karaoke version Fleetwood Mac’s bitter breakup song Dreams.

The skies cleared around 7pm and the sun began to set. This was the perfect time to catch Koffee, the up-and-coming star from Jamaica, on the West Holts stage.

Half of the crowd was engaged in a low-slung dance to her songs, while the other half sat back and enjoyed the sunshine-kissed beats.

Lorde, who was back on the Pyramid Stage, declared herself to be the “ideal comedown shepherd”, for Glastonbury’s tired festivalgoers.

“We are in this together. She laughed and said, “I’ll be gentle and kind to you when you’re ready to handle it.”

She kept her word. She kept her promise.

Surprise sets were also provided by Jack White, who had his hair dyed blue to match the color of his guitar, as well as George Ezra. The crowd poured out from the John Peel tent onto the fields beyond.

Festival-goers will spend their last hours after Lamar in silent discos and dance tents on the outer fields. But, Glastonbury will be over by tomorrow morning.

You can watch Kenrick Lamar’s Glastonbury performance via BBC iPlayer.

Follow us on Facebook or Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.