About 300 miles north of Manhattan sits the Clinton Correctional Facility, a maximum-security prison that, in 1995, housed its most famous inmate: Tupac Amaru Shakur. He had been sentenced to one and a half to four and a half years in a sexual assault trial the previous fall. On top of normal psychological torture that comes with imprisonment, Pac was also having trouble sleeping. In November of the previous year—the night before a jury convicted him—he was shot in the lobby of a Manhattan recording studio. “I have headaches,” he’d later tell Vibe. “I wake up screaming. I’ve been having nightmares, thinking they’re still shooting me.”

But outside of prison, he was becoming a superstar. In March of ’95, Interscope released Pac’s third album, Me Against the World. It’s a remarkable record, at turns tender and fatalistic. There are fever dreams of the golden age in New York City; he mulls suicide and perches by windows with AKs. The album went immediately to No. 1.

It also had Pac’s first Top 10 hit, the towering “Dear Mama,” where he raps about “hugging on my mama from a jail cell.” Few mothers could relate more than Afeni Shakur, who was one of 21 members of the Black Panther Party indicted by a New York grand jury in 1971. They were accused of plotting to bomb two police precincts and the Queens Board of Education office, and of planning to shoot the officers who would flee from one of the precincts after the explosion. The Panthers were ultimately acquitted on all 156 counts in what was, at the time, the most expensive trial in the history of New York state. A month later, Afeni gave birth to her son who, growing up in East Harlem, was surrounded by radicals: the Panthers, the Black Liberation Army; Assata Shakur was a family friend. His stepfather, Mutulu Shakur, was on the FBI’s Ten Most Wanted list and on the run for much of the ’80s—FBI agents would approach Tupac at school and hound him for information.

“Dear Mama” and the rest of Me Against the World was written and recorded at a tipping point. “I Get Around” and “Keep Ya Head Up” were gold records, and roles in the films Juice and Poetic Justice revealed a complex, magnetic actor. But legal bills were stacking up. He was sentenced to 30 days in jail for his part in a fight at a Michigan State concert; he served 15 days for assaulting the director Allen Hughes, who had fired him from the set of Menace II Society. Then, of course, there was the sexual assault case that ultimately landed him in Clinton. While he planned to appeal the case, he couldn’t scrape together the $1.4 million he needed to bail himself out. Royalties weren’t rolling in fast enough, and the Panthers were nowhere to be found. So there he sat with his headaches and nightmares.

Enter Suge Knight, the imposing co-founder of Death Row Records. By 1995, Death Row was a behemoth, and Suge had muscled his way into boardrooms, helped make Dr. Dre and Snoop Dogg superstars, and taunted Puff in Midtown at the Source Awards in what’s arguably become the most-quoted podium speech in rap’s history. His grip on the West Coast might have been tenuous—Snoop was in constant legal peril, and Suge was likely beginning to sense that Dre wanted off of the label—but it was, for the moment, unquestioned. Burned onto the retinas of anyone in the business was Suge draped in blood red, chomping on an unlit cigar, scowling, dangling pop stars off hotel balconies by their ankles.

The exact business arrangement Suge negotiated for Pac’s bail is hazy: In The Defiant Ones, the HBO documentary that aired last year, those who worked at each major label say that Atlantic and Interscope financed and engineered Pac’s move from Interscope to Death Row as a way to placate Time Warner’s skittishness about gangsta rap. Either way, the bail got paid, and Pac was locked into a three-album contract with Death Row. It was a relationship that would irreparably alter Pac’s life, Suge’s life, and the arc of rap history.

It would also yield All Eyez on Me, one of the most sprawling, furious, paranoid, brilliant albums ever released. The anger that simmered in Tupac through his time in Clinton was stoked by Suge, by the assassination attempt, by the press and his rivals. Where Pac’s earlier work had described the experiences of those who were fleeing the law or the feds or death, now all those things were rendered in the first person. On October 12, 1995, Pac was released from jail. He flew to Los Angeles and immediately started recording. On his first night out, he cut one song called “I Ain’t Mad at Cha,” a heartfelt elegy for an incarcerated friend finding Islam, and regards the growing distance between them with a mixture of pain and pride. But there was another song from that first madcap session, something sparse and sinister that would eventually open the album. He starts it in a whisper: “You don’t wanna fuck with me.”

~~

At the height of its power, Death Row operated out of Can-Am Studios, a complex in Tarzana, Calif., just over the hills from L.A. All that Suge surveyed was red: the walls, the couches, the chairs. On the floor was a red carpet, with the label’s logo outlined in white; the understanding was that no one could tread on the logo, a residual superstition from Knight’s days as a defensive end in Division I football.

From the moment he landed in California, Tupac wrote and recorded at an incredible pace. Some artists who worked alongside him during this period, like Nate Dogg, later suggested that this was so Pac could quickly satisfy his contract with Death Row and leave the label. It’s also possible he simply felt the clock ticking on his time as a free man. By 1996, that fatalism had begun to engulf nearly all of Pac’s writing; he was also keenly aware that he was out on bail, and a return to prison was a very real possibility.

Whether or not the Nate Doggs of the world were right about Pac wanting to burn through his Death Row obligations, there’s something almost Old World about the relationship Tupac traced between art and money. This is a superstar who was relying on expense money to eat, someone whose temporary freedom had been granted, magnanimously, in exchange for his art. When he says, on “Can’t C Me,” “If this rappin’ bring me money, then I’m rapping till I’m paid,” it warps the archetypal rapper-label relationship, and Suge comes out looking like a particularly brutal Medici.

Whatever the reason, Pac was working off the cuff, and he demanded the same from his collaborators. He challenged guest rappers to have their verses ready after giving them mere minutes to write—if they didn’t finish crafting something, or if they couldn’t nail it on the first take, they’d be cut from the song. The only artist who escaped this fate was Snoop Dogg, who slipped out of the studio to perfect his verses from “2 of Amerikaz Most Wanted.”

All of this gave All Eyez on Me the feel of a furious storm. “Heartz of Men,” which opens with the stutter from Prince’s “Darling Nikki,” is about that breathlessness: From the opening ad-libs (“Ay Suge, what I tell you, nigga—when I come out of jail what was I gonna do? I was gonna start digging into these niggas’ chests right?”) until the climactic “Tell the cops to come and get me,” there’s barely a pause, certainly never a second thought.

Pac’s greatest strength as a writer was his ability to isolate emotions: to identify them within himself, to evoke them in listeners, and to convincingly ascribe them to the characters he rendered, be they imaginary Brendas or caricatured Biggies. While he was an endlessly complex individual, Pac liked to choose one gut feeling and blow it up to its technicolor extreme—never to the point where it became unbelievable, but he had little interest in hedging himself or tacking on qualifiers. On All Eyez, that impulse, combined with the pace and method and recording (and with his legal situation, and with his mounting paranoia), made for an alchemic blend of horror, fate, and defiance.

During the sessions he was an omnivore, swallowing up sounds from his youth or his periphery, borrowing the syntax of those who floated in and out of Can-Am, distilling his collaborators’ most painful life stories for 30-second cameos. That’s what he coaxed out of Napoleon from the Outlawz on “Tradin War Stories”: a 10-bar verse about the day when, as a 3-year-old, he saw his parents murdered in front of him. “Got My Mind Made Up” might as well have been a Wu-Tang song. The album’s second disc, which is packed with guests like E-40, C-Bo, and Richie Rich, is practically a love letter to Bay Area hip-hop: not only the self-consciously political tradition that Pac came of age in, but also the swaggering, eccentric stuff that was seeping out of Vallejo.

There are two factors that help to unify such a sprawling, ambitious album full of disparate pieces. The first comes from the album’s phenomenal post-production and mixing. Sixteen of the 27 beats are credited to either Daz or Johnny “J,” each of whom delivers a career-defining performance. But All Eyez benefits greatly from DJ Quik, who was forced, due to contractual red tape, to work mostly under his government name, David Blake. Only “Heartz of Men” is officially a Quik beat, but the Compton legend did a significant amount of mixing and remixing. As varied as the sounds themselves are, the album has a uniformity of texture, and elegies like “Life Goes On” and larks like “Check Out Time” foreground their shared DNA.

Pac’s relationship with Dre never gelled like Suge had hoped. Dre had planned to use a solo version of “California Love” as his next lead single, but Suge’s edict that the best work of every Death Row artist be cannibalized for Pac’s album tabled that idea indefinitely. So All Eyez on Me is in the curious position of having its lead single included only as a remix with an entirely different beat. Though Dre’s other contribution to the album, the George Clinton-assisted disc-two opener “Can’t C Me,” is a highlight, the musical chemistry far outpaced their personal bond.

The other element that helps connect all these disparate threads is Pac’s increasingly singular rapping style. Since 1993’s jagged, Public Enemy-indebted Strictly 4 My N.I.G.G.A.Z., he had known precisely what worked for him. But on All Eyez, the component parts of his formula—voice, cadence, mixing, energy—cohere into something powerful, accessible, but inimitable. To go back to “2 of Amerikaz Most Wanted”: Listen to the interplay between Snoop’s silk and Pac’s sandpaper, one rapper slipping over the beat, the other clawing his way through it. The 21st-century notion that Tupac was an unexceptional technical rapper is absurd; some of his simplest approaches require incredibly powerful performances. He was a master of mounting tension, giving full dimension to words that would fall flat with from the mouth of anyone else.

That clarity of style and identity allows All Eyez to spiral out in the grimmest and most lighthearted directions without ever losing its focus. And so there are moments like the end of “All About U” where Snoop, curled up in a bathrobe, flips through the channels and cross-compares the Million Man March with Montell Jordan videos, but five songs later, Pac lets “No More Pain” bludgeon the listener into a sort of hollow hypnosis. The sugary “Thug Passion” slides right into the sober “Picture Me Rollin,” “I Ain’t Mad at Cha” into the incomprehensibly filthy “What’z Ya Phone #.”

All Eyez on Me is just as political as Tupac’s first two albums, which dealt with national politics in more overt terms. Pac’s writing is inherently and inescapably political, and his feelings about prison, about race, and about America permeate nearly every verse. On songs about video models, he slips in lines like “Life’s hell for a black celebrity.” Take this to its logical end: “How Do U Want It,” the gleefully sleazy single with K-Ci & JoJo, features a mid-song tangent about Bill Clinton, Bob Dole, and C. Delores Tucker. For Tupac in 1996, sex would inevitably be wrapped up with politics and freedom.

The sexual abuse conviction that landed Pac in Clinton Correctional Facility has been documented exhaustively. In November 1993, Tupac and several associates of his sexually assaulted a woman in a New York hotel. A year later, he and his road manager were convicted of first-degree sexual abuse. (Each was acquitted on related sodomy and weapons charges.) Tupac was sentenced to one and a half to four and a half years in prison, with the possibility of parole after the first 18 months.

Through the trial, Pac adamantly maintained his innocence. While the case is the subtext for much of Me Against the World, he addresses it head-on only in fleeting moments (“Who you callin’ rapist?”). What’s curious about All Eyez on Me is that Tupac raps so ravenously about, well, fucking. Two of the first three songs are about sex, and the fifth is “How Do U Want It“; then there’s “Phone #,” the conceit of which is “here’s a lot of phone sex.” It is defiant and it is tone-deaf; it is baiting those who believed the charges and it is an attempt to will something out of existence.

All of it was of a piece with personal feuds and paranoias. When “How Do U Want It” was pushed as the album’s third single, one of its B-sides, the anti-Bad Boy screed “Hit Em Up,” became perhaps the most famous diss track of the ’90s. Following the shooting at Quad Studios in Manhattan, Pac had become convinced that his former friend, Biggie, was involved in plots to kill him. And so you get Pac lashing out, taunting his rivals, trying to clear Biggie’s wife Faith Evans’ vocals for a song on All Eyez. But you also hear a chest-crushing fear come through on songs like “Holla at Me.”

In August 1996, just two weeks before his assassination, Pac was doing a press junket for Gang Related, the last movie he would ever act in. Someone asked him about his name. He talked about a man named Tupac Amaru II, who in 1780 led a revolt against Spanish colonists and what was effectively an economy of slave labor that exploited the native populations. In the centuries since, the uprising has been mythologized by some of those fighting for indigenous rights or independence throughout Latin America; in his own time, Amaru was marred by rumors of his uneven control over the rebels, with stories of brutal looting and violence dirtying his reputation and eroding support.

Eventually, two of his officers betrayed him, and he was captured. He was sentenced to watch his wife, son, and other relatives be executed, after which he was to be drawn and quartered in the town square. His tongue would be cut out and his severed head would be displayed on a stake.

Pac talked about this—the revolution, the betrayal, the execution. Then he composed himself. “People ask me what my name means, and I don’t tell ’em like Tupac Amaru,” he said. “I just say it means ‘determined,’ because I’m determined to never, ever negotiate again.”

All Eyez on Me was likewise without compromise—an exhaustive survey of Tupac’s brain matter at the most harrowing time in his young life. It captures him at his most vulnerable and provocative. He executes an array of styles at an almost impossibly high skill level that never feels like an exercise in form. What could have been (and perhaps what was) a creative work made out of obligation turned into a bloodletting, a remarkable final document from one of his era’s defining voices.

And yet for all the mania and fury, the best revenge Tupac exacted against enemies—those real and imagined—came when he was at his coolest and most controlled. Tucked into the back half of the second All Eyez on Me disc, “Picture Me Rollin’” is that proverbial eye of the storm. Pac opens the song rapping about frayed nerves and federal surveillance, then cedes the floor to CPO and Big Syke for several minutes. When he comes back in, it’s for a satisfied, almost tranquil monologue. He’s waving at Clinton Correctional from the outside—he sneers at the punk police, the crooked C.O.s. The District Attorney who tried his case is “that bitch.” He wants to know: Can you see me? Can you see me from there?

But his last words take on a sort of phantom quality. Pac’s surely talking to the guards who wish he was still under their thumb when he says: “Anytime y’all wanna see me again, rewind this track right here. Picture me rollin.’”