The ruling is the first European judgement on the contentious issue.