Danish filmmaker Lars von Trier was condemned and declared “persona non grata” Thursday by the Cannes Film Festival for saying that he sympathizes with Adolf Hitler.

A statement from Cannes organizers castigated von Trier for his comments a day earlier. It is an unprecedented move by the festival that bestowed its highest honor on the director’s film “Dancer in the Dark” back in 2000.

Christine Aime, who heads the festival press office, said von Trier’s current film, “Melancholia,” remains in competition but that if it wins anything at Sunday’s closing ceremony, von Trier “won’t be there to receive the prize.”

At a news conference for the film Wednesday, von Trier said in a rambling speech that he understood and sympathized with Hitler. He said afterward he had been joking and later issued an apology.

The festival statement said the Cannes board of directors “firmly condemns these comments and declares Lars von Trier a persona non grata at the festival.”

The festival “provides artists from around the world with an exceptional forum to present their works and defend freedom of expression and creation,” the statement said. The board “profoundly regrets that this forum has been used by Lars von Trier to express comments that are unacceptable, intolerable, and contrary to the ideals of humanity and generosity that preside over the very existence of the festival.”

On Wednesday, von Trier told reporters at the “Melancholia” news conference that he had some compassion for Hitler.

“What can I say? I understand Hitler, but I think he did some wrong things, yes, absolutely. But I can see him sitting in his bunker in the end,” von Trier said. “He’s not what you would call a good guy, but I understand much about him, and I sympathize with him a little bit. But come on, I’m not for the Second World War, and I’m not against Jews. …

“I am very much for Jews. No, not too much, because Israel is a pain in the ass.”

Von Trier went on to say he admired Hitler aide Albert Speer. The remarks came as von Trier discussed his German heritage.

In an interview afterward, von Trier said he had been joking and that the remarks had spilled out without any forethought.

“I don’t have so much to say, so I kind of have to improvise a little and just to let the feelings I have kind of come out into words,” von Trier told The Associated Press. “This whole Nazi thing, I don’t know where it came from, but you spend a lot of time in Germany, you sometimes want to feel a little free and just talk about this (expletive), you know?”

“This is a welcome action which declares to the world that the suffering of victims is not a fit subject for mockery or casual self-promotion,” Elan Steinberg, vice president of the American Gathering of Holocaust Survivors and their Descendants, said in a statement. “The organizers of the Cannes film festival have eloquently taken a determined moral stand against cavalier expressions of hate and insensitivity to those brutalized by the Nazis — Jew and non-Jew.”

Cast members of “Melancholia,” including Kirsten Dunst, Charlotte Gainsbourg and John Hurt, sat uncomfortably alongside von Trier as the director made his Hitler remarks. At one point, Dunst leaned over and whispered to von Trier, “Oh my God, this is terrible.”

Dunst said in an interview later that von Trier was embarrassed by the remarks.

“He likes to run his mouth,” Dunst said. “I think he dug himself in a deep hole today.”

Copyright 2015 by Associated Press. All rights reserved.This material may not be published, broadcast, rewritten or redistributed.