A French court on Wednesday ruled that Terry Gilliam’s The Man Who Killed Don Quixote can be screened as the closing title at the Cannes Film Festival on May 19, Variety reported. The court was hearing a plea filed by Portuguese producer Paulo Branco seeking an injunction on the screening and the film’s theatrical release in France the same day. Branco, who had briefly worked with Gilliam on the film, has claimed that he has the rights to the production.

The court said that the May 19 screening must be preceded by a statement asserting that the showing does not prejudice Branco’s claim to the rights of the film. Branco called the ruling “a wise decision”, asserting that he was not angry. “Commercial exploitation [of the film] cannot go ahead until the dispute is settled,” he told the press.

The ruling comes days after Gilliam suffered a minor stroke. Gilliam lauded the verdict on Twitter on Wednesday.

The Man Who Killed Don Quixote is a fantasy comedy revolving around a modern-day advertising executive named Toby who meets an elderly man who believes himself to be Don Quixote from Miguel de Cervante’s novel of the same name. The film stars Adam Driver and Jonathan Pryce.

Gilliam’s film has been in the making for more than 20 years and has seen multiple cast changes owing to repeated delays over flooded sets, damaged equipment insurance woes and the deaths of some of its actors. Gilliam finally finished shootingthe film in June last year.

The Man Who Killed Don Quixote.

In an interview to AFP in April, Gilliam had said that Branco “had nothing to do with the film”. The director has claimed that Branco failed to cough up the necessary funds, after which he found new backers.

“His demands are laughable, absurd,” Gilliam said. “He is trying to make as much money as he possibly can from a film he did not produce.”

The Man Who Killed Don Quixote was a late addition to the Cannes 2018 programme. In a statement on April 30, the festival organisers said that they were “squarely on the side” of Gilliam.

“We know how important this project, which has gone through so many trials and tribulations, is to him,” the statement read. “The trouble [was] caused on this last occasion by the actions of a producer who has shown his true colours once and for all during this episode and who has threatened us, via his lawyer, with a ‘humiliating defeat’.”

Branco had responded by declaring that the festival was “not above the law”, adding that the “the virulence and aggressiveness of [its] tone will not change anything”.