A 13th-Century anti-Semitic carving may remain on the wall of a church in Wittenberg, Germany, a court has ruled.
A Jewish man, Michael Düllmann, is seeking to have the sculpture removed.
The relief shows a rabbi lifting a sow's tail and peering at its behind while other Jewish figures suckle on her teats. Pigs are considered unclean under Jewish law.
The image is on the wall of the Stadtkirche, where Protestant reformer Martin Luther preached.
Portrayals of Jews in obscene association with female pigs were used as a way of mocking them and their religion in the Middle Ages.
Mr Düllmann told local broadcaster MDR ahead of the ruling, that as long as the "Judensau" remained on the wall, the Church would be guilty of promulgating anti-Semitism.
Luther himself produced a tirade of anti-Semitic writings, arguing that synagogues and Jewish homes should be burned and Jews be expelled. The theologian's texts, including one entitled On the Jews and Their Lies, were quoted by the Nazis four centuries later.
In the 1980s the Church community in the east German town installed a memorial on the ground next to the church's wall, which refers to the six million Jews murdered during the Third Reich.
There is also an information board, erected more recently, which aims to put the anti-Semitic relief in its historical context. These additions informed Tuesday's ruling by the regional appeals court of Saxony-Anhalt, in Naumburg.
The court found that while the sculpture would be offensive if viewed in isolation, "in the context in which it has been placed by the church it has lost its insulting character", according to spokesman Henning Haberland.
The church's pastor, Johannes Block, told the Süddeutsche Zeitung newspaper that having the sculpture on the facade of the church filled him "with shame and pain".
"We are trying to deal with this difficult inheritance responsibly," he told the paper (in German). The parish wanted to leave the carving in place as a reminder of the anti-Semitism of the Middle Ages, and of the anti-Semitic features of Luther's theology, he explained.
The court ruled that Mr Düllmann may still take the case to Germany's highest court in Karlsruhe.