It has been 25 years in the making, but The Man Who Killed Don Quixote, director Terry Gilliam's tribute to the classic Spanish novel, has finally hit the silver screen. The project has floundered and been revived so many times, it became a poster child for Hollywood's notorious development hell, with a reputation of being cursed. But Gilliam persevered, and while the finished product isn't exactly a masterpiece, it definitely reflects the singular vision of one of our most original filmmakers.

(Mild spoilers for the film and Miguel de Cervantes' 17th-century novel below.)

Miguel de Cervantes' Don Quixote is inarguably one of the most influential works of Spanish literature. The book is written in the picaresque tradition, which means it's more a series of loosely connected episodes than a plot. It follows the adventures of a nobleman (hidalgo) named Alonso Quixano who has read far too many chivalric romances and becomes convinced he is a knight errant. With his trusty peasant sidekick, Sancho Panza, he embarks on a series of random tragicomic adventures, with the Don's hot temper frequently getting them into scraps. (Sancho usually gets the worst of the beatings and humiliations.) Don Quixote is the archetype of the delusional dreamer, tilting at windmills and believing them to be giants, preferring his fantasy to mundane reality.

Everything went almost comically wrong from the start.

Gilliam came up with the idea for his Don Quixote film back in 1989 when he read Cervantes' novel, but he didn't secure funding until 1998. Johnny Depp signed on to play the role of Toby Grisoni, while his then-partner Vanessa Paradis would be the female lead. Shooting commenced in 2000 in Navarre, Spain. But everything went almost comically wrong from the start. There were conflicts with the various actors' schedules, making it difficult to get everyone on set at the same time. The production site was near a NATO military base, and F-16 fighter jets flew overhead the entire first day of shooting, making it necessary to dub those scenes in post-production. A flash flood ruined the second day of filming by damaging equipment that was not covered by the insurance policy. The flood also caused continuity problems, since the colors of the terrain had noticeably changed.

Finally, on the fifth day, the film's star, the late Jean Rochefort, was clearly in pain during the scenes on horseback, despite being an experienced horseman. He turned out to have prostate problems and a double herniated disc, and while Gilliam tried to shoot around Rochefort's scenes, it soon became clear the ailing actor could not return to the set. The production was officially cancelled in November 2000.

The shoot did produce a critically acclaimed documentary film, Lost in La Mancha (2002), detailing the production's various woes. (It was originally intended to be an accompanying "making-of" special feature. A second follow-up documentary is in the works, titled He Dreamed of Giants.) In it, cinematographer Nicola Pecorini claims that "never in 22 years of being in this business have I seen such a sum of bad luck."

In the years since, Gilliam kept trying to revive the project with a constantly shifting cast and multiple rewrites of the script. Finally, he succeeded in getting funding and completing The Man Who Killed Don Quixote, only to have its release delayed by legal disputes involving one of the earlier producers. The film ultimately debuted at Cannes last year, although it was ineligible for the top prize because of its ongoing legal woes.

They might be giants

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

YouTube/ONE Media

The Man Who Killed Don Quixote features Jonathan Pryce as Javier, an old cobbler in a small Spanish village. He becomes convinced he really is Don Quixote after a visiting college student named Toby Grisoni (Adam Driver) casts him in a student film about the legendary hidalgo. Ten years later, Toby is a hotshot advertising executive who returns to Spain to shoot a Quixote-themed commercial. He finds Javier still so caught up in his delusion that Javier mistakes Toby for his loyal sidekick, Sancho Panza. Together, they set off on a series of increasingly wild and incoherent misadventures. And like Cervantes' Sancho, Toby often bears the brunt of the consequences.

The cast is fantastic, especially Pryce and Driver. The dialogue is sharp and witty, and Gilliam remains a master at skirting the fine line between comedy and tragedy—much like Cervantes himself. The first half of the film works really well, driving home the unintended consequences that a naive Toby's student film wrought on the people of that small Spanish village. ("I'm incorporating the idea of the damage that films do to people, so it's become a bit more autobiographical," Gilliam told the BBC last year.)

This may be one of those visionary films that will play better with age.

Unfortunately, the plot, such as it is, unravels into delirious chaos during the second half. Toby even breaks the fourth wall at one point to wonder aloud, "There's a plot?" Certainly the sumptuous visuals and dazzling dream-like sequences, blurring the line between what's really happening and what's just in Toby's head, reflect Gilliam's unique sensibility. It's the same sensibility that produced Gilliam's incomparable dystopian satire, Brazil (1985), which kept the director's wilder instincts well-constrained and was all the better for it. The Man Who Killed Don Quixote might have benefited from a few more constraints. But given the sheer effort of will it took just to make the film, I'm inclined to forgive its chaotic excesses. It helps to be familiar with the source material, since the film shares the same meandering episodic structure and weaves in plenty of nods to Cervantes' novel.

"The problem is that people have very high expectations," Gilliam told the BBC in May 2017. "And a lot of people say I'm a fool to make the film, and that it would have been better to let people imagine how great it would have been rather than making it a reality and disappointing them. People love Roman ruins because they're not complete and you can imagine them. So I may be making a great mistake. Maybe the film would be better as a fantasy."

He has a point. Personally, I'm glad Gilliam finally finished his film, the way he always wanted, with all its messy imperfections. Whether it connects with audiences remains to be seen. This may be one of those visionary films that will play better with age. Its spirit is true to the picaresque tradition, and the Man of La Mancha would approve, I think. Gilliam has been tilting at this particular windmill for 25 years, and it's gratifying to see him finally conquer the giant.