Judges in Portugal were guilty of sexual discrimination in a medical compensation case when they decided that the importance of sex diminished with the age of a woman, Europe's human rights court ruled in a judgment published Tuesday.

Maria Morais, a 50-year-old Portuguese woman with two children, claimed that medical negligence during botched gynecological surgery at a Portuguese hospital in 1995 left her unable to have normal sexual relations. She won her compensation case for physical and mental suffering, but the hospital then won a 2013 appeal that cut the payout by around one-third.

Justifying the cut, judges in Lisbon argued sex was not as important because of her age. The three-judge panel — made up of two men and a woman — were all over 50, according to Morais's lawyer, Vitor Ribeiro. The case triggered a storm of protest in Portugal, where one female lawmaker described the ruling as "Taliban jurisprudence."

The France-based European Court of Human Rights sided with Morais, saying Portuguese judges were guilty of "prejudices" and had violated the right to respect for private and family life. It ordered Portugal to pay Morais 3,250 euros ($3,790) in damages and 2,460 euros for costs and expenses.

The Portuguese court's decision "ignored the physical and psychological importance of sexuality for women's self-fulfillment and other dimensions of women's sexuality," the European court said.

"The (Lisbon court) decision had moreover been based on the general assumption that sexuality was not as important for a 50-year-old woman and mother of two children as for someone of a younger age. In the (European) court's view, those considerations showed the prejudices prevailing in the judiciary in Portugal," it added.

There was no immediate reaction from Portuguese authorities.

The European court noted two other judgments in Portugal, in 2008 and 2014, concerning medical malpractice complaints by two male patients. In those cases, Portugal's Supreme Court found that the fact that the men could no longer have normal sexual relations had affected their self-esteem and brought "tremendous or strong mental shock," regardless of their age or whether they had had children or not.