A High Court in South Africa has overturned the classification of a controversial film, which focuses on a gay relationship between two men at a Xhosa initiation school, as hardcore porn.

The decision of the Film and Publications Board Appeals Tribunal was procedurally unfair and unlawful, as the producers of Inxeba (Wound) were “given no proper opportunity to participate in the decision and no proper opportunity to influence the outcome of the decision”, Judge Joseph Raulinga was quoted by the TimesLive news site as saying.

However, the judge was critical of Inxeba, saying “if cultural beliefs and practices are to be considered‚ the film is harmful and disturbing and exposes 16-year-olds to the sexual conduct depicted in the film”.

He added: "The film included language which was degrading to Xhosa women and further exposes women to societal violence such as rape.

"It contains harmful scenes which could cause tensions within the Xhosa community and even within the broader African community.

"By implication it has an effect on the rights of the Xhosa traditional group.”

Traditional leaders from the Xhosa group, the second-largest in South Africa, spearheaded opposition to the film's portrayal of gay love against a backdrop of a rite of passage ceremony for young men.

"You cannot make a joke about a ritual that people love. It is really very offensive," Chief Mwelo Nonkonyana, a senior Xhosa traditional leader, was quoted as saying.

The film, directed by John Trengove, has been shown at film festivals around the world, including Germany and Israel.

It was short-listed in the Best Foreign Language Film category at this year's Oscars.

Lawyers for the filmmakers challenged Inxeba's classification as hardcore porn on the grounds that it did not contain "long sex scenes", and was not made with the purpose of causing "erotic sensation".

The classification meant the film could only be shown in adult stores, and not cinemas, TimesLive reported.