Director Terry Gilliam has lost a legal battle over the rights to the film ‘The Man Who Killed Don Quixote’.

Gilliam, whose has in the past directed ‘Brazil’, ‘Twelve Monkeys’ and ‘Fear and Loathing in Las Vegas’, has tried to get the movie, based on the classic Spanish novel of the same name, made for almost two decades.

The first trailer for the film, which stars Adam Driver and Jonathon Pryce, dropped in April and the completed movie premiered at the Cannes Film Festival this year. However, its fate, and distribution, is now totally up in the air.

According to Screen Rant, the Paris Court of Appeal has ruled in favour of the film’s former producer, Paulo Brancho, who sued for rights to the project on the grounds that Gilliam made the film illegally.

The Portugese producer signed a contract with Gilliam to produce the film in 2016 with his production company Alfama Films. Their collaboration fell through, and Gilliam pushed forward to film the movie in 2017.

According to Branco and the production company Alfama, Gilliam and his crew did not hold the rights to make the film.

Branco said: “The film belongs in its entirety to [the production company Alfama Films]. The film was made illegally. It’s the first time I’ve ever seen so many people embark on a mission to produce and exploit a film, without holding the rights. It’s a unique case.”

Gilliam will also have to pay a little over €10,000 in damages to Alfama Films, and the company will be seeking similar recompense from the film’s production crew and the Cannes Film Festival.

Gilliam has yet to issue a response to the ruling.

It’s now in Branco’s court as to whether the film gets a release at all.