Japanese filmmaker Ryusuke Hamaguchi and screenwriter Takamasa Oe won the Best Screenplay at the annual Cannes International Film Festival on Saturday for their work "Drive My Car," becoming the first Japanese to win the prize.

A brooding, melancholic drama spanning three hours, the film is based on a short story of the same name by novelist Haruki Murakami.

Japanese film director Ryusuke Hamaguchi poses for a photo after winning the Best Screenplay at the annual Cannes International Film Festival in France on July 17, 2021. (Kyodo)

The film tells the story of a grieving stage actor and director who finds solace in a young woman he hires as a driver following the death of his wife. Its main character is played by Japanese actor Hidetoshi Nishijima.

French director Julia Ducournau won the prestigious Palme d'Or for her film "Titane," becoming the second female filmmaker to win the top prize.

"The first person I have to thank is the writer of the original work, Haruki Murakami," Hamaguchi said in an award acceptance speech. "I believe (the screenplay) was commended because those who played in the film did a great job."

Earlier this year, Hamaguchi, 42, also took home the Silver Bear Grand Jury Prize at the 71st Berlin International Film Festival for his film "Guzen to sozo" (Wheel of Fortune and Fantasy), a collection of three short stories on chance and coincidence, each revolving around a woman.

The last Japanese winner of the Palme D'Or was director Hirokazu Koreeda, who won the award in 2018 for his film "Shoplifters." Hamaguchi's love story "Netemo Sametemo (Asako I and II)" was also selected in the competition lineup that year.

The 74th Cannes film festival, which was canceled last year, was held from July 6 to 17 after being postponed from May due to the ongoing coronavirus pandemic.