Chinese censors have approved public screenings of a movie featuring gay characters in leading roles for the first time, in a landmark ruling that has been hailed as a sign of change in the world’s most populous nation.

Seek McCartney, a romance that centres on a relationship between two gay men - one French, one Chinese – will become the first film of its kind to screen in Chinese cinemas. Director Wang Chao broke the news via a post on the Chinese version of Twitter, Weibo. “This is a small step for the film department,” he said. “And a big step for the members of the film industry.”

Homosexuality was decriminalised in China in 1997 and removed from a list of mental illnesses in 2001, but same-sex marriages and domestic partnerships remain forbidden and many families, institutions and even educational textbooks still treat gay relationships as a problem that needs to be fixed. Attitudes are complicated by the fact that the country tolerated same-sex affairs for much of its history, according to Richard Burger, author of Behind the Red Door, a history of sex in China, but such permissive attitudes applied only when homosexual relationships manifested in addition to “traditional” male-female couplings, and these days there is often relentless family pressure to marry and have children.

Xing Fei, of the Sichuan Academy of Social Sciences, estimated in 2013 that as many as 12m gay men are married to straight women. Work pressures on employees to show they are settled into wedlock can be extreme: many gay Chinese people report being passed over for promotion and even fired without justifiable cause. Gay-straight conversion clinics are widespread, though a landmark case in December last year ruled “gay cure” treatments involving hypnosis and electric shocks were illegal.

Seek McCartney is a Chinese-French co-production, with the local contribution also helping to explain why censors handed it a release spot. China allows only 34 films a year made by foreign film companies to screen at the world’s second-largest box office, as it seeks to foster interest in home-produced movies and protect them in the face of competition from Hollywood fare. Foreign films given permission to screen are rarely those with adult-orientated themes and tend to be blockbuster fantasy productions with little or no controversial content. The censor has been known to mount rapid U-turns: in 2013 the blood-soaked Quentin Tarantino western Django Unchained was pulled from cinemas after less than a day on release following complaints about a full-frontal nude scene featuring the film’s lead actor, Jamie Foxx.

Experts warned that Seek McCartney’s approval should not necessarily be hailed as a sign of a relaxation of censors’ usually prudish attitudes. “The fact that this film can be released in theatres doesn’t mean gay films in the future will be able to released in China,” LGBT film-maker and rights activist Fan Popo told AFP. “China’s system for evaluating films is still very unstable, because the rules are very unclear. It depends heavily on the individual censor’s whims.”