The Polish government has been ordered to pay compensation to a woman after reversing custody of her children when she began a homosexual relationship.
Judges at the European Court of Human Rights (ECHR) determined on Thursday that Warsaw had discriminated against the mother based on her sexual orientation.
The applicant, who was born in 1970, had appealed to the Strasbourg court after losing custody of her four children.
She had first been granted full custody after divorcing her husband of 12 years in 2005. But her husband applied for a change of custody rights in October 2006.
When it emerged that she had started a relationship with another woman, a Polish district court reversed the arrangement.
The unnamed woman appealed, arguing that she had always been the primary carer for the children, but the appeal was dismissed in January 2008.
Then in June 2009 the district court judge threw out an application by the mother for custody of her youngest child, saying the boy's father had a "larger role in creating [a] male role model". Her second appeal was dismissed by a regional court.
The ECHR noted that the district court judge sat alone, and was understood to be "well acquainted" with the woman's parents, who did not approve of her decisions.
"The applicant's sexual orientation and her relationship with another woman were constantly at the centre of the deliberations and omnipresent at every stage of the judicial proceedings," ECHR judges said in their decision.
The Strasbourg court said there had been a "difference in treatment between the applicant and any other parent" based on her sexual orientation.
As such, six ECHR judges concluded, the Polish court had violated the woman's Article 14 right to respect for private and family life, and Article 9 right not to be discriminated against. One Polish judge recorded a separate, dissenting opinion.
The Polish state was ordered to pay the woman €10,000 in damages.