Speaking about the matter for the first time in public, Asghar Farhadi forcefully denied that he plagiarized his 2021 film “A Hero.”

“My film was not based on the documentary,” the Iranian Oscar-winning directed said on Tuesday afternoon at the Cannes Film Festival. “I think the matter will no doubt be cleared up. And I’m sorry it has created so much ill feeling.”

An Iranian court is hearing a case involving a former student, Azadeh Masihzadeh, who has accused Farhadi of copying the idea for his movie from a documentary that she showed him in a 2014 workshop in Tehran.

“A Hero,” which won the Grand Prize in Cannes last year, tells the story of a man who finds and returns a bag filled with gold coins while he’s been temporarily released from prison. But once his deed as a good samaritan receives media attention, police suspect he could be lying.

Farhadi’s producer Alexandre Mallet-Grey has claimed that “A Hero,” which was released by Amazon Studios in the United States, is based on a story that was covered in Iranian news reports. Masihzadeh says that she first uncovered the story in her documentary about an inmate in Shiraz.

The Iranian court is expected to deliver a final verdict, although the timeline of the ruling remains unclear. In April, press reports incorrectly suggested that Farhadi had been found guilty. Those stories have now been corrected.

Farhadi addressed the allegations in a long and impassioned statement at a press conference for the 2022 Cannes jury, of which he’s a member. As his peers watched on — including “Titane” actor Vincent Lindon, Rebecca Hall and Joachim Trier — Farhadi gave a detailed answer in Farsi, which was translated into English by an interpreter.

The public nature of Farhadi’s comments suggests that the director felt the need to defend his reputation internationally. He’d been rumored to be in the running to lead the Cannes jury as president, until the plagiarism allegations surfaced. As a Cannes juror, he could find himself in a tough spot since Iran has two films in competition: Ali Abbasi’s “Holy Spider” and Saeed Roustaee’s “Leila’s Brothers,” neither of which have been cleared by local authorities to screen in Iran.

Read Farhadi’s full comments below:

Asghar Farhadi: “I have never spoken directly about this matter. A lot of the information that you have just given was published in the newspaper. The information was incorrect and was corrected subsequently. So I think we need to rectify the situation in light of the correct information.

“This documentary was something I saw at a workshop. I talked about it with the student. But much later on, I created the film ‘A Hero.’ And it cannot be viewed as a way of plagiarizing. In fact, in ‘A Hero,’ what is in the film is something quite different.

“We have to see why certain journalists have spread this incorrect information. What we do is to make fiction films and what I did in my film ‘A Hero’ is not related to the work done in the workshop I just referred to. It was based on a current event. This documentary and my film ‘A Hero’ are simply based on an event that happened two years prior to the workshop. When an event takes place and is discovered by the press, then it becomes public knowledge and you can do what you like  — you can write a story or make a film about the event without one being a copy of the other.

“You can look at the information on this event. ‘A Hero’ is just one interpretation of this event whereas the documentary was a documentary. It was not the same take at all. The newspaper you’re referring to talked about plagiarizing. This is not actually true and likewise the case is being studied by the religious authorities. There will be a jury to judge the case. But we don’t know when the case will be heard. It’s a very lengthy process.

“Obviously, this has created a certain amount of ill feeling, but my film was not based on the documentary. A suggestion was even made that the earnings of the film be shared between the two fo us. I think the matter will no doubt be cleared up. And I’m sorry it has created so much ill feeling. I hope, however, that this mistaken information that’s been written about this matter will be corrected. It has even said that I’ve ben sentenced, which is wrong.”

Nick Vivarelli contributed to this story.