good kid, m.A.A.d city is a 2012 bildungsroman dealing with the structural causes of gang violence and inequality in urban America. Its story unfolds in Compton, California, but its relevance to the country as a whole has been on vivid display in recent years as the Black Lives Matter movement has unfolded. Protest art at its finest, good kid, m.A.A.d city is a reminder of the intractability of the problems faced by minorities in the United States, even after minorities have become majorities in many areas and the country has seen its first African-American president.

Oh, and it comes in the form of a hip hop album.

good kid, m.A.A.d city was the major label debut of Kendrick Lamar, a West Coast rapper who in his teens started making a major impact on the underground world of mixtapes and guest appearances in which up-and-coming stars must earn their dues (in most cases, interminably). Spotted and hyped mercilessly by Dr. Dre, who nowadays spends his time selling headphones and incubating talent, the pressure on Kendrick to produce a critical and commercial success was overwhelming. Lesser rappers have been placed in a similar position and failed, while 50 Cent only managed one improbably-good album before beginning an immediate and sharp decline. Amazingly, Kendrick not only pulled it off but went on to even greater heights with his second major release, To Pimp a Butterfly, in 2015.

good kid, m.A.A.d city tells the story of Kendrick's youth in Compton and his vain (and often half-hearted) attempts to escape the corrupting and polarizing influence of gangs, guns, drugs and alcohol. The album has a dense and non-linear narrative which actually makes the album as an art form relevant again in an era of single-track downloads and invokes the strengths of progressive rock. Rather than relentlessly trying to build and promote a particular persona as many rappers do - think of Fifty's swagger or Tupac's philosophical bent - Kendrick instead plays half a dozen characters as the story unfolds, complete with different voices, tempos and tones. He contradicts himself. He contains multitudes.

The album combines elements of the West Coast sensibility and focus on hedonism with the introspection more typical of East Coast artists. Yet the West Coast sensibility is nearly always only deployed so that it can be subverted - the value of hedonism is questioned and its hidden costs are stressed. The protagonist is first sucked in and corrupted by his local culture and then outgrows it, announcing himself as an artist who addresses universal and not just local themes.

As the album's story unfolds, it demonstrates the perverse way that a pervasive gang and gun culture turn what are everyday acts for most people into the riskiest of endeavours. The narrative begins with Kendrick driving in his mother's van to meet Sherane, a girl who he is falling in love with and thinking about marrying. When he enters her neighbourhood, he is accosted by two gang members who demand to know whether he has a gang affiliation of his own and what area of Compton he is from. In a spoken-word skit, which the album uses to advance the narrative rather than to entertain as most rappers do, the boys bat aside his attempts to establish his bona fides by invoking his relationship with Sherane. "Fuck who you know - where you from?" they demand, symbolizing the gang culture's dismissal of human connections in favour of a geographic view of identity which makes any outsider an enemy. Later, the same question is intoned ominously over the album's title track in a voice which seems to represent the system itself.

The protagonist's run-in with the two gang members starts a tit-for-tat exchange which leaves one of his friends dead and finally gives him the impetus to stop his flirtations with gang culture. Along the way, we are treated to meditations on the seductive power of materialism ("Money Trees"), the hopelessness of attempting to drown sorrows in alcohol ("Swimming Pools (Drank)"), and peer pressure ("The Art of Peer Pressure"). Even traditional staples of the genre are performed with irony - for instance, a braggadocio track ("Backseat Freestyle") is used to illustrate the young Kendrick's immaturity. But unlike so much hip hop, this album is about victimhood, not mastery. Kendrick isn't Compton's Most Wanted - he's "Compton's Human Sacrifice". These contemporaneous struggles are unfolding for the narrator alongside the main story arc, as the ruthless logic of geography and identity - along with an unhealthy dose of boredom and voyeurism - lead the protagonist to seek gang affiliation for his own protection - and guilt-ridden edification.

The narrator makes the decision to escape this way of life - and it is a decision, implying that the structural forces described throughout can in fact be avoided if one has the will to do so. But Kendrick seems ambivalent on this question. The album reaches its meditative climax with the twelve-minute "Sing About Me, I'm Dying of Thirst". In this track, Kendrick considers the redemptive power of storytelling from a number of perspectives, carrying on a conversation between himself and a number of characters who challenge his use of their stories to make wider points about their city and way of life, a conversation in which agency is the obvious subtext. Kendrick is by no means satisfied that he has done them justice.

If the album has a failing, it is that its redemption narrative is somewhat overwrought and obvious - between songs, voice mails from Kendrick's parents implore him to stay out of trouble and focus on his music. After their friend is shot dead, a brave and kindly woman on the street leads Kendrick and his friends through the evangelical Sinner's Prayer, which is an act of renewal and rebirth. It's all a little on the nose. But if we see good kid, m.A.A.d city as only the first book in a body of work which will probe the themes he raises here and give voice not just to the individual players in the ghetto, but to the structural forces which shape and sustain the ghetto itself, then we can forgive a litle schmaltz. The scene is now set, and it looks like Kendrick has legions of voices with which to bring it to life.