References to a gay relationship have been edited out of a new Fantastic Beasts movie for the Chinese market, Warner Bros. has confirmed.

Six seconds of Fantastic Beasts: The Secrets of Dumbledore have been removed following a request from the communist country, the studio said.

It aims to dispatch films worldwide “as released by their creators” but “historically” has faced “small edits made in local markets”, it added.

Dialogue taken out refers to a romantic past between male characters Albus Dumbledore (Jude Law) and Gellert Grindelwald (Mads Mikkelsen), Variety reported.

Author JK Rowling revealed Dumbledore was gay in 2007 after being asked by a young fan whether he ever finds love.

Rowling did not state whether Grindelwald had returned his affections, however.

Despite the change made to the new Fantastic Beasts movie, its “spirit remains intact”, a Warner Bros. spokesperson said.

They commented: “We want audiences everywhere in the world to see and enjoy this film, and it’s important to us that Chinese audiences have the opportunity to experience it as well, even with these minor edits.”

The latest movie, released last week, also features Eddie Redmayne and Katherine Waterston.

The film shows how Dumbledore worries as Grindelwald moves to seize control of the wizarding world.

Unable to stop him alone, he entrusts Magizoologist Newt Scamander to lead a team of wizards, witches and one brave Muggle baker on a dangerous mission.