The Welsh Assembly has voted to introduce a smacking ban in Wales.

Assembly Members voted 36 to 14 in the Senedd on Tuesday in favour of the Welsh Government bill, which sees the country join 58 other nations including Scotland to end the physical punishment of children.

Ministers say the legislation will come into force in 2022 after gaining Royal Assent, but opponents of the new law say it will criminalise parents and increase pressure on already-stretched social services.

The public have been promised an extensive awareness campaign before the implementation of the law.

First Minister Mark Drakeford said "times had changed" and physically disciplining children was no longer a part of modern society.

He said: "I'm proud Wales has taken this step and once again put children's rights at the heart of what we do here in Wales.

"Protecting children and giving them the best start in life should always be our priority.

"Times have changed and there is no place in a modern society for the physical punishment of children.

"Wales joins Scotland in being the first parts of the UK to see through a positive change to this key piece of legislation."

The law change will remove the common law defence of reasonable punishment which is currently available to parental figures if accused of assault or battery against a child.

It is the first divergence of core criminal law between Wales and England, where parents would still be able to legally physically punish a child as long as it is deemed "reasonable".

The Children (Abolition of Defence of Reasonable Punishment) (Wales) Bill was led by Deputy Minister for Health and Social Services Julie Morgan, who said there was "no such thing as a loving smack".

She said: "Physical punishment has no place here in Wales - there is no such thing as a loving smack and no justifiable reason for a big person to hit a little person.

"I'm delighted we have voted to change the law to help protect our children and future generations."

She added: "The change in law will bring clarity for parents, professionals and children that physically punishing a child is not acceptable in Wales."

Professor Sally Holland, Children's Commissioner for Wales, said: "I'm so pleased, delighted and proud that Wales has joined dozens of other countries around the world to give children the same protection from physical punishment that adults enjoy.

"It's never OK to hit a child - congratulations to the Welsh Government and to members of the Senedd who have prioritised children's rights by passing this legislation."

But opponents of the law change said it would do nothing to help children at risk of being abused and would have a "negative impact" on families.

Dr Ashley Frawley, a sociologist at Swansea University and spokeswoman for the Be Reasonable Wales campaign, said: "The smacking ban bill is simply bad policy.

"It will result in highly negative intervention in good families, increased pressure on beleaguered social services departments and will do nothing to help children who are genuinely at risk of abuse.

"The Government has chosen to ignore a plethora of concerns about this legislation. Sadly, it seems the negative impact of the smacking ban will only be realised when it has come into force."

A letter from a group made up of individuals from the fields of sociology, criminology, child psychology and parenting had earlier urged AMs to oppose a change in the law, describing it as a "dangerous experiment".

Welsh Conservative AM Janet Finch-Saunders said last year the ban could deter parents from England from holidaying in Wales.

She said: "I have concerns about raising awareness. I don't want people to be thinking, 'I'm not going to Wales as I'm unclear about the law and I can't reasonably parent my children'.

"We don't want reports of people coming on holiday to Llandudno and suddenly getting a knock on the door of their hotel, where somebody has accused them of smacking their child and they're completely oblivious to this."