The 69th Cannes Film Festival got off to an awkward start when Woody Allen, whose new film “Cafe Society” kicked off the fest, was the subject of a rape joke during Wednesday night’s opening ceremony.

“It’s very nice that you’ve been shooting so many movies in Europe, even if you are not being convicted for rape in the U.S.,” said master of ceremonies Laurent Lafitte.

The joke, which drew gasps from the Palais audience, was taken as a knock on Allen and possibly on director Roman Polanski as well.

French comedian Lafitte co-stars in Paul Verhoeven’s rape drama, “Ellen,” which premieres next week at Cannes.

“Thank you for coming tonight, sir,” he continued in French. “But it’s good, because you give badly-paid bit parts to French actors, which kind of puts them in their place.”

The 80 year-old filmmaker had received a standing ovation just minutes before.

Later, popular French actor Matthieu Chedid, aka M, performed a special tribute to Prince, singing “Purple Rain” against a purple backdrop to the delight of the crowd.

Allen, joined by cast members Kristen Stewart, Jesse Eisenberg and Blake Lively on the red carpet, was making his 12th Cannes appearance with the movie. It was his third time opening the international fest. “Cafe Society,” a fairy tale set in 1930s Hollywood, made for an appropriate launch to a festival that focuses on classic movie glamour.

Before the opening ceremony, the red carpet was damp with rain before sunshine and stars like Justin Timberlake warmed up the atmosphere. Oscar-nominated actress Jessica Chastain was also on hand for the festivities, as were Eva Longoria, Victoria Beckham and Naomi Watts. Timberlake was in France to promote his new animated film “Trolls” opposite Anna Kendrick, who wore a stunning yellow gown.

“Cannes is an extraordinary festival, I see so many people I know and the audience always responds well,” said Allen before the festivities. “I like Hollywood, seeing friends there, but I couldn’t live there.”

Jury president George Miller, whose “Mad Max: Fury Road” wowed Cannes last year, was honored with a montage of his career during the ceremony.

“I will tell you this jury will deliberate very assiduously,” he told the audience.

While on the red carpet, jury member Laszlo Nemes said to a Canal Plus journo that the alchemy between his fellow jury members was already working well. “At the same time, everyone seems to have strong opinions so it will be it will interesting,” said the Hungarian filmmaker, who was raised in France.

Actress Kirsten Dunst, a member of this year’s jury, said “George Miller is so kind. He brings everyone together in a nice way.”

Also in attendance on the red carpet: Belgian actress Virginie Efira, who stars in Paul Verhoeven’s competition entry “Elle” and in Justine Triet’s “In Bed With Victoria,” which is opening Critics’ Week.

At Wednesday’s early morning press screenings, word of mouth on “Cafe Society” wasn’t great. But the pic, which opens July 15 in the U.S., was met with a warmer reception than Allen’s recent films such as “Irrational Man” (which screened at Cannes last year) or “Magic in the Moonlight.”