Judge Hugh Jones sparked opposition from the child's official guardian and the two local authorities involved in the case when he refused to approve a care plan designed to free the two-year-old girl for adoption.
'There was concern by the hospital about her mother not visiting her in hospital,' said counsel for the girl's court-appointed guardian, Elizabeth Lawson.
Her father at one point refused to return her to her mother but, in early 2002, she was seen with bruising and a black eye while in the mother's care, Miss Lawson told the court.
Judge Jones - sitting at Pontypridd county court - said he was conscious that he was differing from the views of experienced social workers and a 'distinguished psychologist'.
But he spelt out eight grounds for holding that the girl's father and partner can now 'provide for her needs' and she should be returned to their care.
Lawyers for the girl's guardian went to London's Appeal Court seeking to overturn the county court order, but came away empty-handed when Lord Justice Thorpe dismissed their case.
He said Judge Jones had given comprehensive reasons for his decision, and had tackled the core question of whether the father 'demonstrably lacked the capacity to meet her needs'.
'The judge did that and in my opinion the attack on his judgement fails,' concluded Lord Justice Thorpe. His fellow judge, Lord Justice Potter, agreed that the appeal should be dismissed.
The girl, who has significant disabilities, is now in regular contact with her father and siblings, but Lord Justice Thorpe said there still needed to be 'careful r eviews of the stepping stones' to ensure that she progresses well in her father's care.
'It does seem to me that there should be continuing judicial supervision,' he said, adding that an interim care order will remain in place until the case returns before Judge Jones later this month.
The child was first taken into local authority care after Rhondda Cynon Taff CBC applied for an emergency protection order early last year.
Today's appeal by the child's legal guardian was supported by that council and another covering the area where the father lives.
STRAND NEWS SERVICE