The Cannes Film Festival has banned Danish director Lars von Trier, a day after he made joking comments in which he said he could "understand Hitler."

The Cannes festival board of directors condemned von Trier's comments on Thursday and said he is now "persona non grata" at the festival.

"The festival's board of directors … 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," officials said.

At a news conference Wednesday for his new film Melancholia, von Trier, in reply to a question about his German parentage, gave a long, rambling answer in which he joked about being a Nazi and potentially shooting a movie titled The Final Solution.

"For a long time I thought I was a Jew and I was happy to be a Jew. Then I met (Danish and Jewish director) Susanne Bier and I wasn't so happy," von Trier began, with a cherubic smile.

"But then I found out I was actually a Nazi. My family were German. And that also gave me some pleasure. What can I say? I understand Hitler. I think he did some wrong things, yes absolutely, but I can see him sitting in his bunker in the end. I sympathize with him a bit."

Von Trier continued: "I'm not against Jews, not even Susanne Bier. … In fact I'm very much in favour of them. All Jews. Well, Israel is a pain in the ass, but … ."

Von Trier apologizes

Festival organizers issued a statement Wednesday saying they were appalled by von Trier's comments. The director later apologized for his remarks, saying he had "let himself be egged on by a provocation."

"I am not anti-Semitic or racially prejudiced in any way," he said. "Nor am I a Nazi."

'He recognized that the festival had to take a firm position in regards to his comments' —Thierry Frémaux

Jewish groups condemned von Trier's remarks and welcomed the festival's censure on Thursday.

"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," Elan Steinberg, vice-president of the American Gathering of Holocaust Survivors and their Descendants, said in a statement.

Von Trier told festival officials he "accepts the punishment," according to Cannes general director Thierry Frémaux.

"He's upset by this matter," Frémaux continued. "He recognized that the festival had to take a firm position in regards to his comments."

Film remains in competition

The festival had considered removing his film, Melancholia, from the competition for the Palme d'Or, its top prize, a spokeswoman said. However, organizers decided against banning the film.However, if Melancholia wins any awards at Sunday's closing ceremony, von Trier won't be there to receive the prize. He previously won the Palme d'Or for 2000's Dancer in the Dark.

Hollywood Elsewhere columnist Jeff Wells has spearheaded a campaign in support of von Trier, saying the festival has overreacted. Though he says he believes von Trier went too far in his remarks, Wells is urging critics to get behind his petition calling for clemency from Cannes organizers.

Wells described von Trier as "a serious and compassionate artist who has time and again made films that have, with the possible exception of Antichrist, lent immeasurable dignity and stature to [the] festival."

With files from The Associated Press