A family court judge has ruled that a toddler whose maternal grandfather is a suspected child abuser must be placed for adoption.
Judge Richard Scarratt was told that the grandfather associated with "known sex offenders" and he said the little girl had to be guarded against grooming.
The judge said the grandfather was suspected of abusing his daughter, the toddler's mother, when she was a child - although there had been no criminal proceedings.
And he said a psychiatrist had told how the toddler's mother had a "very close relationship" with the grandfather and "could turn a blind eye to the risk posed by him and his associates".
The judge said his inexorable conclusion was that the toddler should be "placed outside of her family" despite her parents' opposition.
Detail of the case has emerged in a written ruling published on a legal website after a county court hearing in Canterbury, Kent, in February.
No-one involved was identified.
Judge Scarratt said Kent County Council started care proceedings after social workers raised concerns about the welfare of the little girl, who recently had her first birthday.
Social workers told how they started care proceedings because of the mother's involvement with "her father's associates" who were "known sex offenders", said Judge Scarratt, in the ruling.
They said they were concerned about the mother's "vulnerability" and feared that she would not "see through" grooming.
And they said the mother had left the toddler "in the care" of a convicted sex abuser.
The mother had also accepted her "emotional dependency" on her father, said the judge.
"I am particularly concerned that the mother does not appear to appreciate the concerns of the local authority in respect of her father and his associates and the importance of guarding against grooming by potential abusers," said Judge Scarratt.
"The evidence … leads me inexorably to the conclusion that the (toddler's) best interests - her welfare being paramount - lie with her being placed outside of her family."
He said he was satisfied that all "avenues and options" had been explored.
The judge said other concerns relating to the toddler's parents' "ability to provide good parenting" had been raised.
Doctor had raised health concerns about the mother, saying she probably suffered from epilepsy and "possible non epileptic attacks with a psychological basis".
A psychiatrist had described the mother as "immature and child-like" and said she "struggled to keep herself safe" and had self-harmed.
Worries had also been raised about the toddler's father.
A psychologist said he had "domestic violence" issues and problems with "inter-personal relationships".
The judge also said concerns had been brought up relating to the father regarding "anger management" and "violence to women".
And a social worker had said the parents lived in "filthy" home circumstances, had "deep-rooted" difficulties and a "fragile relationship".
The parents had wanted to care for their daughter and said, if that was not possible, the father's mother should care for her.
But the judge decided on adoption, saying the toddler would be at "risk of significant harm" if returned to her parents' care.
"I am quite satisfied that all the avenues and options have been analysed," he added. "I am wholly satisfied that (the toddler's) welfare now and for the remainder of her minority will be an adoptive placement."
He acknowledged the parents "love for their daughter" and said he appreciated how "sad" they would be.
But he added: "I hope that once the dust settles, if it ever does, that they will appreciate that this court has done what is best for (the toddler) and not necessarily what the parents might wish. She is the first priority in the court's eyes."