(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.

"Now, the adultery of the woman is a very serious attack on the honor and dignity of the man," the ruling, signed by Judge Joaquim Neto de Moura, said. "It was the disloyalty and the sexual immorality of the plaintiff that made (the defendant) fall into a profound depression, and it was in this depressive state and clouded by the revolt that carried out the act of aggression, as was well considered in the judgment under appeal."

Ruling slammed as 'abusive'

The ruling also suggested that this domestic violence case was less important than other such cases because of the woman's infidelity.

"This case is far from having the seriousness that, generally, is presented in cases of mistreatment in the context of domestic violence," the ruling says. "On the other hand, the conduct of the defendant took place in a context of adultery practiced by the plaintiff."

The judges also cited the Bible and its passages "that the adulterous woman must be punished by death."

Condemnation of the higher court's decision and reasoning was swift, with Amnesty International calling it "abusive."

"Amnesty International Portugal expresses its concern not only for the performance of the adjudicating judges in breach of the legal and constitutional precepts, but for the reflection of a culture and justice that promotes misogyny," a statement from the human rights group said.

Amnesty also said the judiciary "has an obligation to protect citizens, equally, without gender discrimination" and to make sure that those who commit crimes of domestic violence are held liable "regardless of the relationship."

It's not known if prosecutors will appeal the latest court decision.