The social workers forced the girl, 11, to submit to the examination to see whether she had been subjected to genital mutilation (circumcision). The girl was collected by police from school shortly after returning from a visit to relatives in Kenya.
Social workers' suspicions that the girl had been circumcised "were based entirely on the fact that the parents have Somalian heritage," Discrimination Ombudsman Katri Linna said in her ruling.
The decision to examine the girl was taken despite the fact that the parents had told their district nurse and social workers that they were opposed to female circumcision and that they were going to Kenya with the sole purpose of seeing their relatives.
The examination showed that the girl had not been circumcised.
The ombudsman is now to take Uppsala Municipality to court for discriminating against the girl and her parents. Officials made no effort to gather evidence that would enable a proper decision to be reached. The girl herself was not given a chance to explain her situation and she was not offered any extra support.
"The social services' actions were based on the family's ethnicity. The child's rights and the rule of law were set aside," Linna said.