At the start of Terry Gilliam’s The Man Who Killed Don Quixote, a title card appears. “And now, after more than 25 years in the making… and unmaking… a Terry Gilliam film.” The history behind the director’s tortured attempt to adapt Miguel de Cervantes’ seminal novel is the stuff of legend, beginning in 1989. He first got it into production in 2000, when Jean Rochefort and Johnny Depp were cast as Don Quixote and his squire Sancho Panza. The derailing of that shoot through set flooding, insurance wrangles and Rochefort’s ill health became the subject of Keith Fulton and Louis Pepe’s Lost in La Mancha, which remains to this day one of the most important documentaries about the filmmaking process.

Shooting was finally complete on The Man Who Killed Don Quixotelast June. In this successful iteration, Jonathan Pryce plays Quixote with Adam Driver cast as Toby, a firebrand film director who returns to Spain a decade after adapting the Don Quixote story for a student film. He discovers that the man he chose to play Quixote—a shoemaker in a small hillside village—continues to believe he is Quixote, and is convinced that Toby is his squire Sancho Panza. The lines between truth and fiction blur, and Gilliam says now that the long road to completing his film has definitively informed the film that will finally premiere in Cannes tomorrow night.

But even as the movie was in the can, last minute distractions threatened to derail tomorrow’s red carpet. There was a lawsuit from producer Paulo Branco of Alfama Films, who claimed he owned the rights to the picture, after an earlier attempt to mount it, and sought to prevent its release. French courts had to rule on whether it could screen, which they did, in Gilliam’s favor, at the start of this festival. Gilliam says now that the wrangling was what led to the loss of Amazon Studios, who had US, Canadian and UK distribution on the pic. Then there was a hospital visit on the eve of the festival when Gilliam experienced what exec producer Jeremy Thomas told Deadline amounted to a “very minor stroke” brought on by the stress of the ongoing troubles.

But as Gilliam sits with Deadline on the eve of the premiere, he refuses to let these distractions spoil his moment. Reaction to the film has been encouraging, he insists, and so he’s ready for his victory lap.

First thing’s first, how are you feeling?

Oh, just a little hospital visit [laughs]. I’m fine. It will probably wreak its revenge when the festival is over, but right now I’m operating fine.

You couldn’t have had a smoother or more trouble-free path to the screen with this film, right?

Well, that’s the problem, if you do Quixote you expect to be treated like Quixote [laughs]. The book is all about suffering, or at least it’s about the triumph over suffering. So it seems to me it has played out perfectly so far.

My moment of clarity happened fairly late in the day because I had just started screening it. I show it to friends, and they bring their friends, and that’s when I know it’s working. I don’t trust my own judgment. There’s a moment where you think, “Yeah, we’ve done this.” Then we screened it for the French press, a few weeks ago, and they just reiterated it. They did exit polls when people were leaving, and I’d say 95% of them loved it. There’s always that one guy who hated it, which is very good because you think, “OK, we haven’t f–ked up completely yet.” But it’s when I saw people weeping at the end that I knew we’d done something.

In Lost in La Mancha, this project had already birthed one of the greatest films ever made, even if it happened to be a documentary about the disasters of filmmaking.

It certainly had one of the longest-running trailers ever made [laughs].

The film we get is very self-aware; the opening title card alludes to the trouble mounting it and it’s about a film director struggling with Don Quixote. How much of that came through the struggle?

I think it changed quite a bit. The thing is, it changed for the better. That’s what was so interesting, is that this whole quarter-century process made the film what it is now, and it’s better. The big jump was when we didn’t have Toby knocked on the head and ending up in the 17th Century. To keep it all modern. Part of that was just the practically—it was just cheaper if you don’t have to paint out all the telephone lines and satellite dishes. But it was a better idea because the original was about him traveling back in time to meet the real Don Quixote. This idea we ended up with, with the guy who believes he’s Don Quixote because he was in a movie in which he played Don Quixote. It really became a movie about movies and the making of movies. The effect of movies. All of that was much more interesting to me.

How much is it self-therapy for this irrational path you’ve followed?

[laughs] Well, in a sense it came from I kept trying to make it new for me. Banging on that same old thing we tried before gets very tiresome. It was tricking my own brain into thinking, “Ah, it’s new, it’s fresh, it’s not the same old s–t we’ve been doing for 25 years.”

I had to put that title card at the start of the film. This was a project that niggled at me through the years. I did other films along the way, because I would get so frustrated with this f–king thing that I’d give up and do something else. But then you finish a film and you get over the postpartum depression of the film you’ve just done, and there’s Quixote standing there in the distance saying, “Now, what about me?”

I went through I don’t know how many producers through the years, and the interesting thing is the producers that came forward were as mad as Quixote. They were the fantasists, not me. I’m the Sancho Panza; I’m the realist. But because the struggle had become so famous, they all came with the thought, “I’m the one that will show the world I’m the best.” It finally got to Paulo [Branco], who has done a wonderful job of showing the world [laughs].

But you spend at least a year, if not longer, with some of these people, trying to get it set up, and then, boom, they didn’t get the money. That’s what was happening.

Your film literally features a producer character, played by Stellan Skarsgård. The way he behaves, it’s like life is imitating art. Are they all based on people you’ve met along the way?

I don’t know, I suppose they sort of are. What I find is interesting is that some of the stuff that’s been going on, when Paulo created this dust storm, or muddied the waters, some people dropped out; distributors. Their excuse is like the line that Stellan says: “Tell them I can’t help, I’ve got a company to run, people depend on me.” It was like that: “We’ve got bigger problems.” But they don’t have bigger problems, they just don’t want to be bothered. So all of that stuff, yes, I’m not sure if any of it is real or if it has all been imagined [laughs].

But it feels, watching the film, that I’ve been through all of this stuff that’s in it over the years, even after we shot it. And I love that. If that is indeed the case, it’s breathtaking, you couldn’t ask for better.

What’s the upshot of this Paulo Branco situation?

He sort of committed auto-suicide here in Cannes. Océan Films here, the French distributors, were like, “F–k it, we’re still distributing the film.” It’s what happens. Paulo was sending all these letters out saying, “I own the film, it’s mine, you can’t show it.” And people—even those that don’t quite believe it—were worried. Once a guy starts suing, everybody just walks away. But I think the way Cannes stood up, and the way Océan has continued to stand up, has put steel into the backs of all the distributors now.

Are you hopeful you’ll replace Amazon Studios in the territories they had?

I’m not worried. There’s a lot of interest, that’s the good thing. It has played out rather interestingly. And all the people that are interested now haven’t even seen the film yet; all the buzz is having a nice effect of its own.

One thing is certain: the niggles in the back of your mind that resurfaced over the years can never return now. You’ve finished this opus.

And I have nothing in my life anymore [laughs]. It’s true, my mind is a blank now. There was always that thing where you’d look over and there was this old guy standing up going, “What about me?” It’s all gone. I’m wonderfully free. What that means, I don’t know yet. I haven’t been able to process it yet. It’s been so concentrated on this, and all the s–t we’ve been doing in the past few weeks. My problem is it’s always been a bit like this. I’m very monomaniacal. I have one thing, and then when that’s done I can start thinking about what’s next. I am very bad at having several things lined up so that before this comes out I have another ready to go.

Right now I have to process this and decipher whether I ever want to make a movie again [laughs]. But luckily my memory is so bad I forget all the s–t and remember the good bits, so I march off again like an idiot.

Perhaps you’ll forget you made this and do it allagain?

That’s it [laughs]. That’s the lingering thing. If Paulo can ever prove to the world that he owns this thing, I would have to go and make the film for him. I can’t think of anything worse!

But I don’t think that’s going to happen. I think we’re in good shape now. The triumph of this has been extraordinary. The way everybody stood up for it and said, “F–k off.” And they’ve even taken away his protocol now. I’m told his booth in the market, Alfama Films, has been removed. I haven’t experienced it firsthand but I was told by two people that it happened.

There’s a side of me I feel a tiny, tiny grain of sympathy—so small I can hardly find it—because he always announced himself as the guy who has made over 275 films, and that he’s always had more films in competition here than any other producer on the planet, and to self-immolate like he’s done with this, I have no idea. It’s a bit like Harvey in a sense; there’s a certain point where karma catches up, folks.

That this film is out in the world is all I really care about. I don’t give a s–t anymore. My opinion doesn’t count. I just want people to see the thing. And what I’d like, more than anything, is for it to become a commercial success. It would make life easier on the next one. The last couple of films I’ve done have not done well. You pay the price for that.

Despite its woes, the film is ultimately optimistic.

It is a joyous film. That’s what I like about it. There’s no sign of the pain or the agony or any of that. That’s what I always wanted on my films. Forget about the maker or the making, does it exist in its own world if you’ve never heard anything about it? Will you enjoy it? Will you see something different? And it’s so strange because, even structurally, it’s an odd film. It’s many films, it really is. It shifts and changes. This film doesn’t play by rigid rules. It’s alive, and that’s what I like about it. That was the whole plan.

And it’s why Adam [Driver] is so f–king brilliant beyond brilliant. The fact that I got Adam in this film… It was Amy, my daughter, who was producing it, who said, “You’ve got to meet this guy.” I don’t even know if I’d seen the Star Wars with him. I went and I met him and it was one of those totally instinctive moments. He’s not at all like an actor. He’s not a standard good-looking leading man. But I just knew it, even if I had no idea he would be as brilliant as he was. Every day he was coming in and being funnier and funnier.

The movie was making itself, I was just holding on for dear life.