Despite its dark portrayal of America’s radical political climate, The First Purge ends on a note of cautious optimism. And as the first-ever Purge experiment comes to an end Kendrick Lamar’s “Alright” plays over the credits, leaving viewers with a modicum of hope.

It’s not just the song’s infectious beat, but its poignant lyrics and the political message associated with “Alright” that drive home the film’s message (and more than a few people in this writer’s screening of the film began dancing in their seats as Lamar’s track played over The First Purge’s credits). Since its release in 2015 as part of the critically acclaimed To Pimp a Butterfly, the track has served as a soundtrack for hope and resistance in some of the most polarizing political moments in recent history.

Warning: Mild spoilers for The First Purge follow below.

Soon after its release, “Alright” was quickly adopted as the de facto anthem of the Black Lives Matter movement. In 2015, protesters chanted its chorus at a Cleveland protest when police arrested a 14-year-old protester and pepper sprayed the crowd. A year later, crowds sang Lamar’s words at a Chicago rally after Donald Trump was forced to cancel a planned campaign stop.

It’s easy to read into the political intention of “Alright,” but why not let Lamar’s own words speak for themselves:

“There was a lot going on — still to this day there’s a lot going on,” he told GQ in a 2016 interview. “I wanted to approach [“Alright”] as more uplifting, but aggressive. Not playing the victim, but still having that ‘Yeah, we strong.’”

Plenty of other writers have hammered home the same message about the song’s cultural significance. In a 2015 piece for Slate, culture writer Aisha Harris explained what makes “Alright” so powerful as both a piece of music and political commentary:

The chorus is simple yet extraordinarily intoxicating, easy to chant, offering a kind of comfort that people of color and other oppressed communities desperately need all too often: the hope—the feeling—that despite tensions in this country growing worse and worse, in the long run, we’re gon’ be all right.

At Glamour, writer Saga Mohammed offered a similar explanation in 2017, explaining that at a particularly dark moment in America history, “Alright” served as a glimmer of hope:

This Grammy winning single provided a sense of comfort and positively at a time where the Black Lives Matter movement rose. It acted as a simple reminder that African Americans and the world as a whole would be ‘alright’ in the end despite the ongoing police brutality in the states.

Of course, at its core, The First Purge is still a horror movie — even if it goes far beyond what’s expected to offer a powerful critique of American power and the way it disadvantages the lower class and minorities. It’s not perfect, though, and even some of its most powerful moments stop short of reaching their full potential.

In one harrowing scene, a bloodied black man crawls across an empty baseball field as a group of murderous cops descends upon him. It’s a strong image, but as [The Ringers] Justin Charity points out in his critique of the film, The First Purge fails to deliver a strong criticism of real-life police brutality.

“The shot is ominously incomplete and maddeningly brief,” he writes, “and the movie does little else to suggest how the police force that killed Eric Garner might have policed the borough’s first Purge night.”

It’s easy to argue that The First Purge uses Kendrick Lamar’s track to pull off an ending that might not work without it, and that’s a valid point. After all, this is the fourth movie in a horror franchise that up until Election Day remained largely lacking in any meaningful political commentary. And, unlike Lamar, the creative team behind the Purge doesn’t have much of a shot at winning a Pulitzer Prize anytime soon.

But The First Purge still comes packed with enough politically charged moments that when the credits roll and “Alright” begins to play, it doesn’t feel out of place. It feels perfect.