Warner Bros. said it has removed references to a gay relationship between two protagonists in the upcoming China release of a “Harry Potter” prequel.

The Hollywood studio confirmed that it has expunged details of the romance between Jude Law’s character, Albus Dumbledore, and Gellert Grindelwald, played by Mads Mikkelsen, in “Fantastic Beasts: The Secrets of Dumbledore.”

The edit, which was first reported by The Hollywood Reporter, takes out six seconds of the film in which Dumbledore utters the lines “I was in love with you” and “the summer Gellert and I fell in love.”

The film’s total run time is 143 minutes.

“As a studio, we’re committed to safeguarding the integrity of every film we release, and that extends to circumstances that necessitate making nuanced cuts in order to respond sensitively to a variety of in-market factors,” a Warner Bros. spokesperson told THR.

“Our hope is to release our features worldwide as released by their creators but historically we have faced small edits made in local markets.”

Jude Law seen in 2022’s “Fantastic Beasts: The Secret of Dumbledore.”
©Warner Bros/Courtesy Everett C

The spokesperson added: “In the case of ‘Fantastic Beasts: The Secrets of Dumbledore,’ a six-second cut was requested and Warner Bros. accepted those changes to comply with local requirements but the spirit of the film remains intact.”

“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.”

Warner Bros. is raking in the cash at the box office in China. The film was the most watched in the country during opening weekend, pulling in $9.7 million — a figure that would have been larger notwithstanding COVID-19-induced lockdowns.

J.K. Rowling, the author of the “Harry Potter” series, first revealed that the two characters were gay during a 2007 fan event promoting the book “Harry Potter and the Deathly Hallows.”

The film was tops at the box office in China after its opening weekend.
©Warner Bros/Courtesy Everett C
The film is the first time a direct reference to a homosexual relationship is made between the characters.
Warner Bros.

This is the first time that the relationship has been explicitly referred to in a film. “Fantastic Beasts: Secrets of Dumbledore” is scheduled to open in the United States this week.

Hollywood studios have been criticized for bowing to Chinese censorship demands in exchange for access to the country’s market.

The makers of big-budget films — including  “Iron Man 3,” “World War Z” and “Top Gun: Maverick”– pandered to the country’s authoritarian government by cutting characters and dialogue that aren’t pro-China, according to PEN America, a non-profit that promotes free speech.

“Mulan,” the live-action remake of the 1998 animated classic, was filmed by Disney in Xinjiang province, where the Chinese government is accused of orchestrating a campaign of ethnic cleansing against Uyghur Muslims.