Wales will not have the power to ban parents from smacking their children, the assembly government has been told.
The Welsh assembly voted in favour of a smacking ban in 2004
The UK government said new law-making powers for the assembly government to protect vulnerable children would not extend to a complete smacking ban.
It said this would impinge on the criminal justice system, which is not devolved to Wales.
The assembly government said it still had the right to ban smacking in childrens' homes or by carers.
This comes within the boundaries of 'social welfare', which the assembly government has control over.
The Labour-Plaid coalition had asked for the right to legislate - known as a Legislative Competence Order (LCO) - on vulnerable children.
But Welsh Secretary State Peter Hain has written to First Minister Rhodri Morgan to tell him the assembly government will not be able to introduce a blanket smacking ban, based on legal advice from the attorney-general.
Some children's charities had supported the prospect, saying a ban would clarify a confusing issue for parents.
Deputy Health Minister Gwenda Thomas also told a committee of AMs that she was in favour of Wales having its own law.
But Family and Youth Concern, which researches the effects of family breakdown, said it was wrong to pass laws on how parents should bring up children.
Under the 2004 Children's Act, which came into force in January 2005, mild smacking is allowed but any punishment which causes visible bruising, grazes, scratches, minor swellings or cuts can result in legal action.
The assembly government said: "We have only just received correspondence from the secretary of state on this issue, and will want to consider carefully all of the points raised."