French police have opened an investigation into controversial comedian Dieudonné M’bala M’bala for a sketch that both justifies and makes fun of the beheading of American journalist James Foley.

Dieudonné, who has been convicted several times for anti-Semitism, described the execution as a “gateway to civilization” in the sketch, which appeared on YouTube last month, according to France24.com.

He also compared executions by the radical Islamist group Islamic State to the guillotining of royalty and aristocrats during the French Revolution and noted that Western media made no fuss about the execution of the late Iraqi dictator Saddam Hussein or the Libyan strongman Muammar Gaddafi.

The Paris prosecutor’s office said police were starting a preliminary investigation into Dieudonné on the grounds that he had condoned terrorism.

Foley was beheaded by Islamic State militants last month after being kidnapped while covering the Syrian civil war and held for 20 months. The act caused outrage around the world.

It was followed last week by the execution of journalist Steven Sotloff, who held both American and Israeli citizenship.

More than 100 other video sketches by Dieudonné have been removed from YouTube in the past few days.

"The Rothschild Mafia says no, that's OK, but James Foley, that's too much," Dieudonné said in the video, titled "Foley That Was." "I think decapitation symbolizes before anything progress, access to civilization. In France, we decapitated people in front of the masses, on the public plazas."

Dieudonné is credited with inventing the "quenelle," a gesture that critics have likened to an inverted Nazi salute and say carries anti-Semitic overtones.