After working on the project for more than 20 years, the writer-director will premiere his Miguel de Cervantes send-up at last.

The Paris Court of Appeal ruled Wednesday that director Terry Gilliam’s decades-delayed “The Man Who Killed Don Quixote” may close the Cannes Film Festival on May 19 as scheduled, Variety reports. Former producer on the project Paulo Branco requested an injunction to stave off the screening and the same-day French theatrical release, asserting he obtained the rights to the film in August 2016. The decision came days after he suffered a reported minor stroke.

“Quixote” was a late addition to the Cannes 2018 program. Pierre Lescure and Thierry Frémaux, the respective festival president and director, have said they took “careful consideration” with this expansion of their slate, since Branco and his Alfama Films had seen legal victories versus Gilliam in England and France (there, in May 2017, Branco’s plea to having filming stopped was rejected regardless). Gilliam appeal to the French ruling last month, prior to the Cannes announcement.

Etienne Laurent/EPA-EFE/REX/Shutterstock

Producer and director parted ways before “Quixote” finally began shooting in March 2017. New funding came via Amazon Studios, the distributor that recently jettisoned its planned American release of the film (Turbo Films will bring the work to Chinese audiences).

Monty Python veteran and Oscar-nominated screenwriter Gilliam (1986’s “Brazil”) recently told news service AFP that Portugal-born Branco — whose credits include David Cronenberg’s “Cosmopolis” — had “nothing to do with the film,” adding, “His demands are laughable, absurd. He is trying to make as much money as he possibly can from a film he did not produce.” Branco’s lawyer and son, Juan, refutes these claims.

Etienne Laurent/EPA-EFE/REX/Shutterstock

A May 2 statement on his production company’s website criticized Cannes leadership for “forget[ting] that without the producers, who take all the economic risks, neither the films nor the Festival would exist.”

The finished product is Gilliam’s homage to Miguel de Cervantes’ Spanish Golden Age classic, “Don Quixote.” In the two-part novel, sleep deprivation turns de Cervantes’ namesake protagonist violent and injury-prone; with his aide, Sancho Panza, in tow, he once confuses windmills for menacing giants. In the 2018 feature, Toby Grisoni (Adam Driver) — named after Gilliam’s co-screenwriter, Tony Grisoni — finds himself tossed into the past, christened Panza by a man who says he’s Quixote (Jonathan Pryce). Stellan Skarsgård co-stars as Toby’s boss, while Olga Kurylenko plays Skarsgård’s wife. Among the final film’s producers is Gilliam’s eldest daughter, Amy.

Gilliam has a long history with the Cannes Film Festival; his “Fear in Loathing” competed for the Palme d’Or in 1998, and “The Imaginarium of Doctor Parnassus” debuted on the Croisette in 2009. Despite recent controversial remarks directed at the #MeToo movement, he has had unwavering support from the festival with respect to “Quixote.” In April, Frémaux told IndieWire, “We are proud to have selected this film. The ban request came after. The approach of a cultural festival is to support artists, not to interfere with ongoing trials.”

Additional reporting by Eric Kohn.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.