It is one of the most dramatic storylines ever delivered at Cannes: Iranian director Mohammad Rasoulof walked the red carpet Friday after fleeing a prison sentence in his home country just days before the film festival.
He received a lengthy standing ovation at the start of the gala premiere as he brandished photos of the actors in his new film, "The Seed of the Sacred Fig", which is competing for the top prize Palme d'Or.
Made underground in Iran on a tiny budget, it tells the story of a court prosecutor whose family life is torn apart by the "Women, Life, Freedom" protests that convulsed the country in 2022-23.
It is the last day of the Cannes Film Festival screenings, with the winners from the 22 entries to be announced on Saturday by a jury led by "Barbie" director Greta Gerwig.
Rasoulof came under pressure to withdraw his latest from the festival, but he already knew during the production that he faced a new eight-year prison sentence for "collusion against national security" and hatched a plan to escape Iran.
He walked the red carpet on Friday alongside his daughter and Iranian actor Golshifteh Farahani, who lives in exile in France.
An outspoken critic of Iran's rulers, Rasoulof had already served two prison terms over his uncompromising political films and had his passport revoked in 2017.
It took 28 days on the road, moving between border villages, to get out of the country, he told Deadline magazine.
"The good thing about going to prison in Iran is that you meet all kinds of youthful people who can help you in such conditions," he told the magazine.
Festival director Thierry Fremaux said he shared the joy of "all festival-goers and all freedom-loving Iranians" over Rasoulof's arrival.
The final film to screen in the competition, later Friday, is "The Most Precious of Cargoes", the first animated film to compete for the Palme d'Or since 2008's "Waltz With Bashir".
It is the tale of a twin thrown to safety from a death train transporting his Jewish parents to Auschwitz, from Michel Hazanavicius, director of the Oscar-winning "The Artist".
The 77th edition of the world-famous festival has seen a lot of sex, gore and #MeToo-related issues.
A late frontrunner is "All We Imagine as Light", which premiered Thursday.
The first Indian entry in 30 years, it is a poetic monsoon-set portrayal of two nurses who have migrated to Mumbai, described as a dreamlike five-star "triumph" by The Guardian.
"Emilia Perez", an audacious musical about a Mexican narco boss having a sex change, has also been a favourite.
Demi Moore has emerged as a serious contender for the best actress award after rave reviews for her "fearless" performance in "The Substance", an ultra-gory horror film about the pressures women face to maintain bodily perfection as they age.
There has been a lot of love for "Anora", a raw and often-hilarious story about a New York erotic dancer who strikes gold with a wealthy client, only to face the wrath of his Russian oligarch parents.
Francis Ford Coppola's ambitious fable "Megalopolis" has its admirers but proved sharply divisive, while Donald Trump biopic "The Apprentice" has drawn strong reviews as well as legal threats from the former US president.