A law banning people in Wales from smacking their children has been passed by the Welsh Assembly.
It is the second part of the UK to do so, after Scotland. The ban will begin in 2022.
Julie Morgan, deputy social services minister, said it was a "historic day".
But the Conservatives Janet Finch Saunders said the state was stepping into the private lives of families. Assembly members passed the law with 36 votes for, 14 against.
The legislation removes the defence of "reasonable punishment" in cases of common assault.
Ms Morgan had campaigned for years for a ban and had broken the Labour whip over the issue when the Welsh Government did not support it, in 2015.
"This is not about the government telling parents how to raise their children or about criminalising loving parents," she told a press conference on Tuesday.
She said the government had listened to the "vocal minority" who opposed the move, but that removing the defence of reasonable punishment "is the right thing to do".
"The children of Wales should have the same protection as adults in Wales have."
She added: "What we are saying is no physical punishment - not to use physical means to punish your children."
She said that could extend to shaking, as well as smacking.
'Not right or fair'
The Welsh Government bill passed with the support of Labour and Plaid Cymru AMs.
At the Senedd debate Welsh Conservative AM Janet Finch-Saunders said she was unconvinced that removing the defence was "right or fair" for Wales.
Her party had a free vote on the legislation and was split. Tory AMs David Melding and Angela Burns backed the law while other colleagues that voted opposed it.
Ms Finch-Saunders said: "With this bill the state is now stepping into the private lives of families".
She added: "Through the involvement of the police and social services... this smacking ban this will potentially have far reaching consequences for us all."
Brexit Party group leader Mark Reckless said that while he did not feel it was morally right to smack a child, the time was not right to legislate while "many loving families" still use physical chastisement.
Helen Mary Jones, of Plaid Cymru, said it was a "happy day" for those who had been campaigning for a ban.
The NSPCC said: "This is a remarkable achievement which closes an outdated loophole and finally gives children in Wales the same legal protection from assault as adults."
How will the smacking ban be policed? What are the rules for visitors to Wales? And what counts as a smack? Here, we answer some of your questions.
What is the legal definition of a smack?
There isn't a definition - and the Welsh Government is deliberately not creating one.
It said the law already allowed parents to handle their children with force.
A parent's right to carry a child to a time-out area, stop them running into the road or dress them would not be affected by the smacking ban, the government said.
As things stand, anyone prosecuted for common assault can argue in their defence that they were delivering a "reasonable punishment". This bill removes that defence.
The Crown Prosecution Service (CPS) said a reasonable punishment defence only works if victim's injuries are "transient and trifling and amounted to no more than temporary reddening of the skin".
Who is supporting the ban and who is opposing it?
Child welfare charities and the Children's Commissioners of Wales, Scotland, England and Northern Ireland want a ban.
Some Welsh AMs have argued in favour for years, but until recently it was not clear whether the institution had the necessary powers.
But not all AMs agree. Conservative and Brexit Party AMs have called the bill a "snooper's charter".
The Be Reasonable campaign is opposing smacking bans around the UK, as are some evangelical Christian groups.
There are strongly-held views on either side of the debate - and both sides claimed public opinion was with them.
How will the smacking ban be enforced?
The criminal justice system will enforce it.
Based on what happened in New Zealand, where smacking was banned in 2007, the Welsh Government expects about 38 prosecutions in five years. The CPS has suggested the figure could be lower.
Prosecutions will be based on evidence gathered by the police.
South Wales Police Chief Constable Matt Jukes said it would be "unlikely" people "are going to start, in vast numbers, picking up the phone to report things to us".
Police could decide to caution someone instead of taking them to court.
They could also issue community resolution orders, which would not go on a criminal record but could show up on an enhanced Disclosure and Barring Service check in some circumstances when people apply for certain jobs.
Which countries have banned smacking?
The physical punishment of children is banned by 58 nation states, according to the Global Initiative to End All Corporal Punishment of Children.
That does not include devolved governments such as Scotland and Wales.
Sweden was the first country to ban smacking in 1979.
AMs heard competing arguments from Sweden about the consequences of the ban.
The office of the New Zealand Children's Commissioner said the proportion of parents who said they used physical punishment fell in the decade after its ban.
What if a parent from England, unaware of the ban, is caught smacking their child in Wales?
Ignorance of the law is not a defence.
Anyone accused of smacking a child in Wales could face the consequences, no matter where they are from.
Police and prosecutors have said it is important visitors to Wales know about the ban.
As soon as they crossed the border into Wales, they would have to abide by the law.
The Welsh Government said it planned to have a "very wide-ranging, intensive information programme" to warn people.
It also acknowledges lawyers will need to be aware the bill creates a "divergence in the law between England and Wales".
What if a child tells a teacher they have been smacked, what would they need to do?
Teachers are already expected to report concerns about physical punishment. It is then up to social services or the police to investigate.
Schools' procedures on safeguarding might need to be reviewed after the defence on reasonable punishment is removed.
Teaching unions have said their members should get more information on what is expected of them in future.
The government said it did not want to stop teachers restraining or controlling pupils physically in school if they have to, for example to stop a fight in the playground.
Ministers and the children's commissioner for Wales have said that for the rest of us, whether or not to report allegations of smacking will be a matter of individual judgement.
This story was inspired by questions sent in by readers of Smacking ban plan in Wales set to clear final hurdle and previous stories on the subject.