Director Spike Lee railed against President Trump in an expletive-laced monologue on Tuesday following the debut of his film "BlacKkKlansman" at the Cannes Film Festival.

Lee criticized Trump’s response to a white nationalist rally Charlottesville, Va. last summer, and reportedly referred to the president as a “mother-----.”

The 61-year-old filmmaker’s movie is loosely based on a true story about a black police officer who works with a Jewish detective to infiltrate a Ku Klux Klan.

The film ends with footage from the protests in Charlottesville, where a woman was killed after a man plowed his car into a crowd of counter-protesters during the “Unite the Right” rally.

Lee said he reached out to the mother of Heather Heyer, who died during the unrest in Charlottesville, to get her permission to use the footage.

“I was given Susan Bro’s phone number. She is the mother of Heather Heyer, who got murdered when that car came crashing down the street,” Lee said. “I was not gonna put that murder scene in the film without her blessing. Mrs. Bro said, ‘Spike, I give you permission to put that in.’”

The ending scenes, which were added after the film already wrapped, also include Trump's televised response to the Charlottesville unrest, with the final image of an upside-down American flag.

Lee – who refused to identify Trump by name – called Charlottesville an "ugly, ugly, ugly blemish on America,” and condemned the president for not using it as an opportunity to denounce the Ku Klux Klan and the alt-right.

“And we have a guy in the White House — I’m not gonna say his f---ing name — who defined that moment not just for Americans but the world, and that motherf---er was given the chance to say we are about love, not hate,” Spike told reporters. “It was a defining moment, and he could have said to the world, not just the United States, that we were better than that.”

Trump said there was blame on both sides for the violence that broke out between white supremacists and counter-protesters.

Lee also noted that the racism depicted in his new film is not unique to the United States, but an issue that plagues the whole world.

"This right-wing (expletive) is not just America. It's all over the world. And we have to wake up," said Lee. "We can't be silent. It's not black, white, or brown. It's everybody. We all live on this planet, and this guy in the White House has the nuclear code. I go to bed thinking about it."

The Associated Press contributed to this report.