Story highlights Judge: Ex-wife's "immorality" made the man "fall into a profound depression"

The judges also cited the Bible and its passages

(CNN) There's outrage in Portugal after an appeals court there ruled that a man shouldn't have to serve jail time in the savage beating of his ex-wife, because her infidelity brought "dishonor" to him.

The beating happened in June 2015, when the man and his former wife's ex-lover joined forces to attack her with a nail-spiked club. According to court documents, the ex-lover restrained her while the man hit her in the head and body with the club. Injuries from the beating to the head required her to get five stitches.

The man, the ex-wife and her ex-lover were not identified in court documents.

The man was given a suspended sentence of a year and three months in jail. He was also required to pay a fine. The public prosecutor's office appealed the case, hoping to get a heavier sentence and force the man to serve some actual jail time.

But the judges on the court of appeals in Porto refused to impose a stiffer sentence on the man. And their reasoning shocked many -- the man's behavior was excusable because the woman's adultery besmirched his honor.

Read More