Monty Python star Terry Gilliam’s long-awaited film The Man Who Killed Don Quixote will premiere at the Cannes Film Festival next week after a Paris court rejected an attempt to block it.

Portuguese producer Paulo Branco had claimed he also has rights to the movie, but the court instead ruled in favour of the Cannes organisers.

Branco initially worked with Gilliam on the film. Gilliam contests Branco’s claims.

Portuguese film producer Paulo Branco claims he also has the rights to the film (AP)Portuguese film producer Paulo Branco claims he also has the rights to the film (AP)

The film, nearly two decades in the making, is scheduled to close the festival on May 19. It has been plagued by production problems, funding issues and legal woes.

While Branco lost the Paris court case, he scored a separate victory when Amazon dropped plans to distribute the film.

The film stars Adam Driver and Stellan Skarsgard.