A mother with mental health issues has written an "incredibly moving" account of why she accepts her toddler daughter should be adopted.
Judge Sarah Lynch said she hoped one day the girl - who social workers feared could not be kept safe with her mother - would read the words.
The mother wrote to the court in Leeds: "I will always love her, she is my daughter but I am doing this for her."
Judge Lynch said she could not imagine the pain the woman had suffered.
Details of the case have emerged in a ruling published by the judge following a private family court hearing.
The mother told the court: "One minute I could care for her and then the next minute I would not be able to.
"I do not feel that this would be good for [her].
"I feel incredibly sad about the situation but I know [she] is going to go to a family who will love her and give her what I cannot give her at the moment."
No further details about the child - including her precise age - have been allowed to be released by the judge.
Social services bosses had asked the judge to make decisions about the girl's future.
Social workers said she would not be safe in the care of her mother, who they described as having long-term mental health difficulties.
No other family members were able to care for the girl and social workers thought adoption was the best option.
'Love her how I love her'
Judge Lynch said the woman had realised she was not well enough to be the "mum she needed to be" and had made an "extremely brave decision".
The woman told the judge in her statement she hoped her daughter "gets placed with a really good family who will love her how I love her and will bring her up right and protect her".
"I hope she gets all the attention in the world from her new family," she added.
Judge Lynch said the girl had already gone into temporary foster care pending long-term decisions about her future.
The woman had been allowed to visit her daughter but had said the visits were too difficult for her to deal with.
She told the judge: "I have not had contact for some time now, not because I do not love [her], but because it is simply too hard for me to go and leave her again."
She added: "I am really sorry that it has come to this position but I know I am doing the right thing and I just want her to know that I love her and always will."
Judge Lynch described the woman's words as "incredibly moving".
"I cannot imagine how painful this has all been for her," she added.