Pedro Almodóvar’s 21st film is fixated on the agony and acclaim that comes with being an artist. The Spanish filmmaker is now 70, and this sudden introspective shift suggest that his most vivid memories reside in the highs and lows of his life. The pain of former loves, recollections of youthful innocence, the frivolousness of old grudge: These emotional aches and pains can oftentimes manifest themselves as viscerally and as powerfully as the chronic ones that accompany senescence. Pain & Glory, which makes no effort to hide the fact that it is very much a piece of autofiction about the writer-director, is the culmination of a life well-lived — it’s as flawed, uneven, idiosyncratic, and satisfying as existence itself. It’s a miserably magnificent thing.

Like Almodóvar, Salvador Mallo (Antonio Banderas) is a Spanish-language filmmaker who has enjoyed global acclaim for several decades. One of his earliest films, Sabor, is now being hailed as a modern classic and has even received a pristine restoration. This is surprising to him because he never particularly cared for the film, but he welcomes the commendation — especially considering he can’t seem to figure out how to tap into that same creative well again. Now in the autumn of his life, Mallo has nearly given up on filmmaking and spends most days trying to find a spark of creativity in the darkness of his countless chronic illnesses. Unable to face the task of introducing the film and attending a Q&A on his own, Mallo calls on Sabor’s star Alberto Crespo (Asier Etxeandia) to accompany him — thus ending a 30-year silence between them.

Once he arrives at Crespo’s apartment, Mallo explains to his former leading man that he completely misunderstood his performance all those years ago and realizes now how exquisite Crespo truly was (and is). From here, the two pick up right where they left off — specifically, Mallo picks up on Crespo’s heroin addiction and starts getting high with the actor every few days in the lead-up to Sabor’s anniversary screening. These narcotic interludes not only alleviate Mallo’s many ailments better than his cocktail of prescriptions, but they also send the stumped filmmaker back to some of his most vivid memories. From time spent with his mother (Penélope Cruz) throughout his adolescence in the small Spanish village of Paterna, to his experience as a choir boy during his religious schooling, to his first serious relationship as a young adult in Madrid, the anguish and pleasure of Mallo’s past seem to only be accessible through his newfound (and dangerous) dependency on heroin.

With the glory of success comes the pain of Mallo’s extensive list of conditions ranging from depression to partial immobility of the spine to the occasional choking fit. It’s easy to read autobiographical intent into Almodóvar’s decision to pair these two up — chasing the high of the creative process and searching for an effective medical treatment for chronic illnesses — and conflate them in his main character’s mind. Sickness takes up every bit of energy that Mallo would rather be putting into his art, so he finds a temporary fix (in this case, heroin) and gets back to work. Then the temporary fix becomes a problem of its own, so Mallo not only has to juggle his maladies and his writer’s block but also his brand-new complication: addiction. Back to square one. Ernest Hemingway had alcohol. Hunter S. Thompson had narcotics. Stephen King had a potent combo of just about every substance imaginable. What Almodóvar does differently here is suggest that Mallo’s addiction isn’t just to help him conquer his suffering — it helps him get in touch with his fondest memories.

The filmmaker’s latest is unabashedly a film à clef, complete with Banderas sporting Almodóvar’s signature gray, spiky hair. Anyone familiar with the Spanish filmmaker’s work knows that the relationship between Mallo and Crespo is reminiscent of the director’s estrangement from Pain & Glory star Antonio Banderas. The two had a falling-out in the wake of Tie Me Up! Tie Me Down! (1990) and didn’t reunite until Almodóvar’s first (and, for now, only) horror movie, The Skin I Live In (2011). The director’s casting of Banderas — along with his recruitment of Penélope Cruz, who has worked with the director since Live Flesh (1997) and was catapulted to mainstream success after starring in All About My Mother (1999) — is the first of many indications that Pain & Glory could have been titled All About Almodóvar. It might sound conceited to make a film that revolves around one of your earliest projects being dubbed a masterpiece — and it is! For the first time in their respective careers, Mallo and Almodóvar have learned how to mine their own personal experiences for the sake of their art.

Thinking about Mallo’s story and the parallels to Almodóvar’s own life that appear throughout Pain & Glory, some questions arise as to how the viewer should parse the filmmaker’s latest text. What is to be made of the threads about Mallo’s sickness and his creative dry spell? Could his headaches and backaches represent the pain of these memories and the weight of carrying them for so many years? Judging by the incredibly self-reflective (and self-congratulatory) nature of the film, the answer is likely yes. Could these choking fits signify a fear of being poorly received, of choking in the artistic sense? In the wake of Julieta (2016), which saw Almodóvar’s worst Spanish opening in 20 years, it appears that this might be the case.

Still, Pain & Glory is not a movie interested in providing definitive answers to these questions. Much like the unpredictability of the seasons of life, the film jumps erratically from moment to moment: characters come and go, all impacted by Mallo’s work in different ways and to varying degrees. This is Almodóvar grappling with the therapeutic power of autofiction, but it’s also evidence of the potential harm that can come from using other people’s struggles for one’s own imaginative fodder. Where Almodóvar goes next is unclear, but one thing is certain: After the healing and transformative salve of Pain & Glory, which suggests a genuine change of heart for the filmmaker, it’s sure to be unlike anything he’s done before.

Rating: B