It turns out that sex after 50 has value after all.

That was the judgment of Europe’s top human rights court when it rejected a decision by Portuguese judges that reduced damages to a middle-aged woman who could not have sex after a botched operation.

The surgery — which occurred in 1995, when she was 50 — happened at “an age when sex is not as important as in younger years,” the judges ruled in 2014. Their decision provoked accusations of sexism and ageism at the time.

The woman, Maria Ivone Carvalho Pinto de Sousa Morais, now 72, challenged the decision, taking the matter to the European Court of Human Rights, based in Strasbourg, France. On Tuesday, that court ruled, 5 to 2, in her favor.

“The question at issue here is not considerations of age or sex as such, but rather the assumption that sexuality is not as important for a 50-year-old woman and mother of two children as for someone of a younger age,” according to the majority’s ruling. “That assumption reflects a traditional idea of female sexuality as being essentially linked to childbearing purposes and thus ignores its physical and psychological relevance for the self-fulfillment of women as people.”