LISBON, Portugal (AP) — Women's rights groups in Portugal have reacted angrily to a court decision that quoted the Bible and a 19th-century law in justifying a suspended sentence for a man convicted of assaulting his ex-wife with a bat because she allegedly committed adultery.

The man was given a 15-month suspended sentence and a fine of 1,750 euros ($2,000) for using a bat spiked with nails to assault the woman in the street in 2015, leaving her covered in cuts and bruises.

The prosecutor had argued the sentence was too lenient and asked an appeals court for prison time of 3 years and 6 months. But the appeal judges on Oct. 11 rejected his request.

In their written ruling, the judges expressed "some understanding" for the attacker, saying a woman's adultery is "a very serious offense against a man's honor and dignity."

They noted the Bible says an adulterous woman should be punished by death and also cited a 1886 Portuguese law that gave only symbolic sentences to men who killed their wives for suspected adultery.

The judges at the appeals court in Porto, Portugal's second-largest city, wrote that they were making reference to the Bible and an old law "to stress that a woman's adultery amounts to conduct which society has always condemned and condemned very strongly."

The written ruling became public this week and sparked outrage on Portuguese social media, with numerous rights groups speaking out.

One of them, the Women's Alternative and Response Union, described the ruling as "inadmissible" because it legitimized violence against women and blamed the victim. It said the separation of powers in Portugal means there is no place for the Bible in courtrooms.

The group planned street protests for Friday.

Portugal's Superior Magistrates Council, an oversight body, said it had taken note of the "vivid criticism from broad sections of public opinion." However, it said courts are independent and it could not intervene, even when faced with "archaic, inappropriate or unfortunate" comments by judges.

The woman could appeal to Portugal's higher courts.