Nottingham City Council has agreed to pay damages to an 18-year-old mother after taking away her newborn baby.
The local authority admitted at the High Court in Liverpool that it had acted unlawfully.
The boy was taken from his mother by social workers in Nottingham on 30 January, but was returned after a judge ruled officials had no right to do so.
The baby boy was returned into social services care following a hearing on 1 February in Nottingham.
The council had claimed the mother's troubled childhood and mental health problems had threatened the baby's welfare.
Her solicitor Ash Bhatai said the council had 14 days to agree a damages figure or the case would return to Mr Justice Munby, who would issue a judgment at an unspecified date.
Before the two sides agreed to compromise, Nottingham City Council planned to argue the mother had not objected to her baby being removed.
But Mr Justice Munby said the fact she did not object did not mean she consented.
The authority also admitted the mother was not given proper care and should have been offered an independent "personal adviser".
But the court heard the teenager's adviser also worked for the council and "had feet in both camps".
The council also agreed to look at how personal advisers were used for all people in its care.
Nottingham City Council will also reimburse the mother for a loss of benefits and pay her £110 per week until 17 March when she might be admitted to an assessment centre.
Mr Justice Munby had described the teenager as possibly being at a "turning point in her life".
He said: "Her problems are deep-seated and long-standing and likely to require appropriate support and assistance for some time in the future."
A legal source said the case was now delicately balanced, with it likely that the teenager and her child would be reunited soon in a mother and baby unit.
In a statement the council said it "accepts that, although our social workers acted in good faith to protect the child, proper legal processes had not been followed in order to make the separation lawful".
"We have commissioned an independent review of this case by the Chair of the Local Safeguarding Children Board."