A woman who took her daughter to Spain after social services staff raised concerns about the youngster's care has apologised to a High Court judge.
Jessica Richards, who is in her 20s, and her daughter Elliana Shand, now four, disappeared from their home in east London during the summer of 2017.
Elliana was found safe and well with Miss Richards in Spain in early January by Spanish police after Mr Justice Hayden, who has overseen the case at hearings in the Family Division of the High Court, made public appeals for help.
Miss Richards on Friday appeared before Mr Justice Hayden at a hearing in London.
She said she had made a mistake in taking Elliana abroad.
"I know what I did was wrong," she told the judge.
"I am sorry about what happened."
She added: "I was scared and desperate. I didn't want to be separated from her."
Another judge had handed Miss Richards a six-month jail term, in her absence, in August after concluding that she had breached orders relating to Elliana and was in contempt of court.
Mr Justice Hayden heard that Miss Richards had been arrested in early February, after returning to London, and held in jail pending Friday's court appearance.
He said he was satisfied that she had "purged" her contempt and ruled that she should be released from prison.
Elliana is now living with relatives.
Lawyers representing social workers told the judge that plans were in place to allow Miss Richards to stay in contact with Elliana.