Iran's government has protested to the Cannes Film Festival over its decision to ban director Lars von Trier for saying he sympathized with Adolf Hitler.

Iran's semiofficial FARS news agency said Tuesday that deputy culture minister Javad Shamaqdari had written to festival president Gilles Jacob saying Cannes had smirched its history and rendered its claims to defend free speech "a meaningless slogan."

The Iranian regime has jailed several filmmakers or banned them from making movies for supporting the country's reform movement.

Cannes declared von Trier "persona non grata" last week after he told reporters that while Hitler "did some wrong things," he could "sympathize with him a little bit."

He later apologized and said it was a joke gone wrong.

In response to the Iranian letter, von Trier said Tuesday that his remarks were "unintelligent, ambiguous and needlessly hurtful."

Von Trier was not allowed to attend Cannes' awards ceremony on Sunday, where Kirsten Dunst was named best actress for her role in his film "Melancholia."

This year's Cannes festival included films by two Iranian directors, Jafar Panahi and Mohammad Rasoulof, who have been jailed by the country's Islamic regime.

Both have been sentenced to six years in jail and banned from filmmaking for 20 years on charges that include "making propaganda" against the ruling system.

Rasoulof's "Be Omid e Didar" ("Goodbye") won a prize at Cannes, but the director was not allowed to travel to France to accept it.