A critical, financial, personal, and possibly even spiritual catastrophe that with each passing day feels more like a masterpiece, Dennis Hopper’s The Last Movie is one of the great lost films of the 1970s. Upon its much-delayed release in 1971, the mind-altering neo-Western nearly ended its director-star’s career, before seeming to vanish without a trace for decades. Or perhaps more accurately, it did end his career. Hopper just managed to resurrect himself years later, painfully and slowly, mainly through supporting appearances as drug-addled weirdos.

Now restored and back on the big screen where it belongs, The Last Movie benefits from multiple viewings the way 2001: A Space Odyssey or Eraserhead or The New World do; you catch through-lines and details you’d missed earlier, while also developing new mini-fascinations and obsessions. It’s the rare film that seems both clearer and completely different with each viewing. And like those aforementioned works, it has an immersive pull that makes you want to see it again — that demands you see it again. The representational fissures of cinema — the tension between the real and the imaginary, between imitation and inspiration — have been woven into its very fabric.

The director-star’s follow-up to the runaway success of Easy Rider, The Last Movie was based on a more classical screenplay (a good one, allegedly) by Stewart Stern, who had also written the James Dean/Nicholas Ray classic Rebel Without a Cause. (Hopper had become friends with Dean on the set of that film and Giant, and the young star’s death haunted him, as it also haunts The Last Movie.) Decamping to the remote village of Chinchero in Peru, 14,000 feet up in the Andes, with a crew, some of his closest pals, and (apparently) a mountain of drugs, Hopper improvised much of The Last Movie, turning the story — about a self-destructive stunt coordinator’s alienation and ambivalence about his job, his affairs, and his life — into a wild reverie on, among other things, alternate planes of existence. He then spent more than a year trying to edit the film at his ranch in Taos, New Mexico, amid a miasma of unchecked, drug-fueled hedonism. (There is an excellent documentary about this chaotic, destructive period in Hopper’s life, called American Dreamer, which is also a lost classic. For a while there, The Last Movie was kind of like the Bermuda Triangle of cinema.)

Hopper plays Kansas, an American horse wrangler and stuntman who decides to stay behind in rural Peru after the Sam Fuller Western he’s working on has wrapped. The death of a stuntman appears to be making him question his life choices, though his unease also seems existential and generalized. He shacks up with Maria (Stella Garcia), a beautiful young woman who used to work at a local brothel. Kansas may imagine that he’s saved her, but in truth, his work — the Hollywood shoot that’s come to town — has poisoned this society. A local priest (Tomas Milian) warns that the movies have brought violence and madness to the land. The chaotic production has captured the imagination of the locals, but in a surreally calamitous way: After the crew leaves, the townspeople re-enact the shoot, but whereas the filmmakers had real cameras and fake violence, this time it’s the cameras that are fake and the violence that’s real.

Early on, we see an image of a fake stunt church being set up next to a real church, and the moment feels less like a bit of movie-set practicality than a rip in the space-time continuum. The Last Movie is built around such dualities, as if myth and reality have been thrown out of alignment and a great, parallel evil has been unleashed upon the world. To convey this sense of everything being out of whack, the film is shot through with a crazy dream logic that takes Hopper’s rapturous vistas (shot by László Kovács) and immersive scenes and reshuffles them into a highly symbolic, stream-of-consciousness freak-out. Meanwhile, we see blown takes. We see repeated takes. We see actors lounging around behind the scenes. Crucial bits of narrative (well, “crucial” bits of “narrative”) are provided out of order. A “scene missing” card flashes on the screen in the middle of what seems a perfectly continuous scene. We forget which shoot is which: The Hollywood movie-within-the-movie, the mad-non-movie-within-the-movie, or the actual shoot of The Last Movie itself (which itself is sort of a nonmovie to begin with, if you listen to its detractors).

But for all the structural lunacy and stylistic experimentation, there’s something almost conservative about The Last Movie. (As there was with Easy Rider, a cautionary tale that turned into a clarion call for the counterculture.) Kansas is a wanderer, and has the melancholy figure of a Western protagonist, but he’s no hero. Walking with Maria, he looks up at an empty hill and says he could be happy there, living a simple life; then he immediately talks about building a landing strip, and a hotel, and a ski resort. He cries at a Hollywood party, but he’s also a violent philanderer and a corrosive drunk, openly attempting to seduce a rich, married American woman in Maria’s presence and then knocking the latter around when she protests his behavior. The rottenness of the world has seeped inside him — or is it the other way around?

The vision of a film shoot turned on its head and given a terrifying new expression in the real world is a particularly rich one, speaking to both the ambitions and dangers of cinema. Every filmmaker wants to make a movie that takes on a life of its own, but they are also the first ones to say, “It’s just a movie” whenever something distasteful happens connected to their pictures. The Last Movie puts the lie to that wish, and confronts it. It seems to ask: If the movies represent a dream life, then what exactly is the dream?

And what happens if you can’t escape the dream? In one of the final sequences, we see Kansas performing a scene where he’s shot dead. Over and over, he performs it, in slow-motion, in fragmented cuts. Are they retakes, or jump cuts? Is the movie stuck? Is he trying to perfect his death, or escape it? Or is he punishing himself? And is the man we’re watching Kansas, or Hopper? Villagers stand around watching his death, as if it were a spectacle — a ritual, a celebration. He gets up, staggers and falls again, gets back up. Watching it now, you ask yourself whether anyone but Dennis Hopper, the veteran character actor who became an unlikely counterculture figure after Easy Rider, could have made this film. And could The Last Movie have had any other fate than to become the cause of both its creator’s greatest ruin and his greatest triumph — sending him off to wander the winds of infamy, a man become a myth, and a myth become a man?

The Last Movie

Directed by Dennis Hopper

Arbelos Films

Opens Aug. 3, Metrograph

Click here to sign up for our weekly film and TV newsletter.