A 20-year-old woman said to live a chaotic lifestyle should be given a chance to mother her baby son, a High Court judge in England has told social workers.
Mr Justice Holman has ruled that the woman and her new baby should be placed together in a specialist foster home.
He said social workers must not separate the little boy from his mother without making an application to a judge - unless there was an emergency.
Detail of the case has emerged in a ruling by Mr Justice Holman following a private family court hearing in Preston, Lancashire, in the north-west of England.
No-one involved has been identified but the judge said social service bosses at Warrington Borough Council had asked him to make decisions about the baby's future.
Social workers said the woman lived a chaotic lifestyle and had raised concerns about the baby's safety.
The little boy had been the subject of two family court hearings within four days of being born.
Mr Justice Holman said he understood social workers' concerns - and said the child should be placed under the council's care umbrella.
But he said the woman should be given a chance to bring up her baby.
"Although I perfectly understand the range of concerns ... in relation to this baby and the parenting he may receive, it does not seem to me that there is anything in the recent history so serious or significant that it should immediately preclude or rule out a sincere and genuine attempt to enable a baby to be mothered and brought up by his mother," he said.
"Save in an emergency, and if there is an immediate risk of danger to the child, the local authority must not remove or separate him from the mother without further application ... to the court."
The judge said social services bosses had "made it plain" that they were willing to organise and fund a specialist foster placement for mother and baby.