The BMA says violence against staff will not be tolerated
CCTV is being installed in four accident and emergency departments across Wales in a pilot project.
Cameras will also be placed in some ambulances as part of the one-year scheme which aims to reduce attacks on staff and secure more prosecutions.
Unions have warned that the number of violent attacks is increasing.
The hospitals are Prince Charles in Merthyr Tydfil, Royal Gwent in Newport, West Wales General in Carmarthen and Ysbyty Gwynedd in Bangor.
The five ambulances to have the cameras are based at the Blackweir station in Cardiff.
It is hoped the £300,000 scheme, being launched at Prince Charles Hospital, will provide evidence to increase the number of successful prosecutions.
Richard Lewis, Welsh secretary of the British Medical Association, said: "We are extremely pleased that the minister is taking action on the violence and aggressive behaviour agenda.
"We have repeatedly stated that there should be zero tolerance to violence of any sort in the NHS and the mechanisms must be there to minimise the likelihood of attacks, to support staff who experience them, and to ensure that anyone who commits an act of violence is dealt with appropriately.
The assembly government has said the scheme would be extended across Wales if the pilot was successful.
Health Minister Edwina Hart, said: "It is unacceptable that NHS staff face wilful violence and aggression whilst going about their day-to-day duties caring for patients.
"The introduction of CCTV cameras will help provide more evidence to support prosecutions and act as a deterrent, making people think twice before abusing staff.
"In undertaking this pilot, absolute priority will be given to ensuring patient privacy and dignity, involving close liaison with doctors, nurses and patient representatives.
"Clear signage will be displayed to ensure public awareness of CCTV."
Conservatives welcomed the news, but said the implementation of the scheme came long after it was announced.
"The roll-out of this pilot project, while welcome, is long-overdue given that ministers first proposed it back in April," said the party's health spokesperson Andrew RT Davies, AM.
"If this pilot project is a success it is vital ministers roll it out across Wales so that all NHS staff are protected."
David Francis, chair of Cardiff and Vale University Health Board and the assembly government's all-Wales anti-violence and aggression champion, said he was confident there would be more prosecutions.
"These pilots reinforce our determination to protect staff and prosecute attackers," he said.
"In addition to investing in these new systems, we also want to build up public support for helping us protect our staff, and the visibility of CCTV will help this."