The anime film “Your Name.” became the highest-grossing Japanese movie of all time in China on Saturday, as young people flock to watch the fantasy love story despite problematic political relations between the two countries.

Box office sales of the film topped the 530 million yuan ($76.16 million) record set in 2015 by “Stand By Me Doraemon,” a 3-D animated film featuring a robotic cat character from a famous Japanese manga series, according to data provided by China’s popular website for cinema tickets, Maoyan.com.

The new record was set soon after the film, directed by Makoto Shinkai, premiered across China on Dec. 2.

Full of picturesque scenes, the fantasy film tells the story of two high school students living different lives in different places — a country girl who yearns for a life outside her small community and a Tokyo boy from the big city — who switch bodies. It was first released in Japan in late August. Since then, it has become a cultural sensation at home and abroad.

China approved the screening of Shinkai’s smash-hit at theaters with exceptionally fast speed, at a time when Tokyo and Beijing are trying to repair bilateral ties.

China is the world’s second-largest cinema market after the United States. However, the government limits the number of foreign films that can be distributed each year and tightly controls which movies are shown.

When the “Doraemon” film arrived at theaters in May 2015, it was the first Japanese motion picture to go on general release in China since July 2012.

China shut out Japanese films in 2013 and 2014, during which time diplomatic ties between the two countries were at their lowest ebb in decades due to disputes over wartime issues and the sovereignty of a group of small islands in the East China Sea.

In 2015, there were only two Japanese films distributed nationwide. But this year, possibly reflecting China’s strong desire to improve public sentiment toward Japan, the number of Japanese films allowed to be shown in Chinese theaters jumped to 11, including Shinkai’s animation.