The ruling could have a wide-ranging impact on local authorities and families
Judges in the case of a girl who was kicked and slapped by her parents have drawn a line at which disciplining children becomes physical abuse.
The couple's three children had been placed with foster parents and care proceedings begun by Swansea council.
A High Court judge in Cardiff earlier dismissed the care proceedings.
The Appeal Court has upheld that ruling and the children will be going home. Swansea council said it had to examine the judgement fully before commenting.
The hearing related to two homosexual parents, a "wealthy well-educated" father and his wife trapped in a loveless marriage.
They have conceived three natural children - all still very young - despite only ever having had sex on a single occasion, and thereafter used artificial insemination.
They said their marriage was merely "a product of cultural and family expectations," the Civil Appeal Court in London heard.
The parents first came to the attention of social services when it was discovered they had subjected a young girl, who was in their care but not one of their own children, to what a judge described as "shocking treatment".
That included regular beatings and threats that a savage dog would be set upon her if she did not behave herself.
The girl was taken into care last year and the situation between the parents and their own children was closely scrutinised.
The children were placed with foster parents after their natural daughter, known as "M", said she had been kicked and slapped by both her parents.
However, in the judgement delivered at the family division of the High Court in Cardiff, Mr Justice Roderick Wood found that the statutory "threshold" for making a care order in relation to the children had not been crossed.
In his view they had not suffered "significant harm", he said.
The children's court-appointed guardian challenged that finding at the Appeal Court in London on Friday.
Solicitor-advocate, Graham Jones, argued that it was "irrational" of the judge at Cardiff not to order that all the children be taken into care.
But the Appeal Court's ruling, which is likely to have a wide-ranging impact for local authorities and families alike, means the children, who were kept away from their parents pending the ruling, will now be returning home.
Giving his judgement on the case, Lord Justice Ward said: "This is, as I understand it, the first time this court has had to consider where the dividing line between harm, and significant harm, is established.
"I readily understand that the words of the judgement [from the family court] record a catalogue of findings capable of causing any social services department concern.
"On an unspecified occasion, or occasions, "M" was slapped on her hand by her parents, she was slapped on her face by her mother, kicked by her father, kicked by her mother, hit on the side of her face by her father, hit to the right hand side of her face, kicked and pushed by her father.
"It sounds terrible. It could speak of a persistent campaign of abuse causing real suffering.
"But it could equally amount, in fact, to no more than a handful of isolated minor acts of chastisement forgotten as soon as administered."
The judge added: "Yes, it amounts to ill treatment, and therefore to harm.
"Yet, despite intensive outside intervention in this family's life, no one ever saw a mark on that little girl and the stark fact is that she appeared to be well nourished, well cared for and with close attachments to her parents.
"The judge heard this case for six days. He is highly experienced in this class of case. The nuances would set his antennae reverberating.
"In my judgement he was fully entitled to come to the conclusion that he did. I am inclined to think that I may well have come to the same conclusion myself."
Lady Justice Hallett agreed , saying: "Reasonable physical chastisement of children by parents is not yet unlawful in this country."
Lord Justice Wilson gave a dissenting judgment, saying that he would have allowed the guardian's appeal, but was out-voted by the other judges.
A spokesman for Swansea Council said: "We need to consider the ruling in full before making a comment."