A baby should be taken from the care of his 41-year-old mother, a family court judge has ruled in "yet another case" which demonstrated how drugs ruin lives.
Mrs Justice King said the life of the woman, whose father was a drug dealer, had been "dominated" by drugs since she was a teenager.
The judge said she had decided "with great sadness" that the seven-month-old boy would have to be brought up by a relative.
"This is yet another case demonstrating how drugs ruin people's lives," she said, in a written ruling following a hearing in the Family Division of the High Court.
"This mother was brought up in unbelievably adverse circumstances, the result of which was the development of a significant personality disorder, a disorder which constantly drives her back to the drugs which have dominated her life since she was 16.
"It was with great sadness, but in no doubt, that in (the baby's) interests I have reached the decision that I have."
Mrs Justice King did not name the woman but said the local authority with responsibility for the little boy was the London Borough of Wandsworth.
The judge analysed the case at a hearing earlier this year.
She has since been promoted and now sits in the Court of Appeal.
Mrs Justice King said the woman had sold drugs for her father as a child, "almost inevitably" had started taking drugs and by 16 was stealing to feed an addiction.
She said in 2013 the woman had been convicted of burglary after tricking her way into the homes of two elderly women and cutting their phone lines so they could not call for help, and given a three-and-a-half-year jail term.
The judge said the woman was pregnant when jailed, had given birth when in custody and had been caring for her son in a prison mother and baby unit.
She said the woman had argued that she had "abstained for any substance misuse" for nearly a year in prison and wanted to care for her son when released.
Social workers said the woman's care of her son in prison had been "excellent", but said the "risk of relapse" posed too great a danger to the child.
They said the boy should live with a relative but have contact with his mother - and Mrs Justice King approved that plan.