Terry Gilliam has said there were many times he wanted to give up during his almost 30-year battle to make his passion project.

The director first thought of making The Man Who Killed Don Quixote, a version of Miguel de Cervantes’ Don Quixote, in 1989 and began filming it with Johnny Depp and Jean Rochefort in 2000 but production only lasted a week.

It was a project beset by so many problems they are the subject of a documentary, Lost In La Mancha, but Gilliam has finally made the film with Star Wars actor Adam Driver and Game Of Thrones star Jonathan Pryce.

Arriving at its premiere at the BFI London Film Festival, he told the Press Association: “(What kept me going was) people not giving me money.

“It’s funny how money is so important in this business.

“I don’t know why exactly I kept going except that I just wanted to do it.

“There had been so many stories. Orson Welles never finished one too, it has been known as a cursed project, not just my Quixote, so it was absolutely essential to finish it.”

He added: “There were plenty of those moments (when you think it will never happen) and part of you wants to give up.

“You just get so tired and then you wake up a few days later and there is Quixote saying ‘Hi’.”

The film has been plagued with legal battles since it was finished and its former backer Paulo Branco sought to prevent its showing in Cannes earlier this year.

A French court found against Branco and it was the closing gala of the festival but the dispute has continued and the film still does not have distribution in the UK and the US.

The Paris Court of Appeal has since ruled in favour of Branco.

Gilliam said: “That is floating on and that is why it hasn’t reached America yet.

“What is interesting about what is happening, we are working our way backwards. Normally you open a film big in America and then you spread down to Europe but we are starting in Europe country by country and bringing this thing up and then we invade America soon.”

He continued: “The film will continue, I won’t. The film will, that is the important thing.”

Pryce added: “The sad thing about it is that the struggles never end and hopefully they can come to some agreement with the, I won’t say his name, with the Portuguese non-producer, that will get this film out throughout the UK and America.

“It’s already being shown by brave distributors in Spain and France and Poland, where it has done really well, so let’s hope the rest of the world gets to see it.”

Pryce said there was celebration on set when the production made it past the point when it fell apart with Depp,

He said: “When we passed the four or five day mark where the original film stopped and we are actually at the original locations, that was quite a moment.

“The whole thing was quite joyful to make, I certainly had a great time.”