BERLIN — A convicted cannibal won a legal battle Friday to block a film depicting his macabre deeds after a German regional court ruled that the pic, about a man who killed and ate a willing victim, violated the rights for the real-life perpetrator.

The court ruled Friday that the film too closely mirrors the case of Armin Meiwes and unjustifiably infringed his personal rights.

Directed by Martin Weisz and produced by Marco Weber’s L.A.-based Atlantic Streamline, “Rohtenburg” was set to open in Germany March 9.

Berlin-based Senator Film, which was to handle German distribution (and is also partially owned by Weber), condemned the decision, saying it would “have devastating consequences for the film industry as well as for the art of film. It’s totally incomprehensible and in our opinion inconsistent with the Constitution, that an artistic work of film dealing with people of contemporary history will now be dependent on their approval and greed for profit.”

Pic stars Thomas Kretschmann (“King Kong”) as Oliver Hartwin, a computer repairman, who, like Meiwes, meets a willing victim on an Internet website for cannibalism enthusiasts. “Felicity” star Keri Russell costars as an American student researching the case.

Meiwes was sentenced to eight and a half years in prison in 2004 for the killing but is being retried after Ger-many’s Supreme Court ruled that his original sentence was too lenient. Meiwes admitted killing his victim, Bernd-Juergen Brandes, and eating at least 20 kilograms of his flesh, but his defense argued that he was guilty at worst of “killing on demand,” which carries a maximum sentence of five years. Crucial to the case has been a gruesome videotape made by Meiwes of the entire incident, during which Brandes made clear his full agreement.

Meiwes has argued that the film could prejudice the retrial. His lawyer, Harald Ermel, said similar efforts may be taken against director Rosa von Praunheim’s “Your Heart in My Brain,” also loosely based on the case, as well as the song “Mein Teil” by German rock band Rammstein, which recounts the grisly killing and feast.

Denying that the legal action was financially motivated, Ermel said he and Meiwes’ goal was to have a truthful presentation of the facts and has complained that the film portrays his client as a “beastly murderer.”

“The ending is all wrong. The victim is stabbed in a frenzy a dozen times. In reality, it was just one stroke,” Ermel said.

Ermel also is looking to stop international distribution of the film.

In an effort to present his side of the story, Meiwes is working with Hamburg-based production company Stamfwerk on a documentary about the case.

Atlantic Streamline has said it would seek to overturn the decision with all legal avenues at its disposal.