Schools in Wales will be required to teach lifesaving skills and first aid under the nation's new curriculum.
Education Minister Kirsty Williams has previously rejected calls for compulsory lessons on emergency resuscitation skills.
The British Heart Foundation had called for cardiopulmonary resuscitation (CPR) to be taught in all schools.
Conservative Senedd member Suzy Davies said it was "difficult to understand why Welsh Government was so resistant".
Ms Williams said guidance to schools would be amended.
In September 2020 CPR was added to the English secondary school curriculum, and in Scotland every local authority has committed to teaching lifesaving skills in secondary schools there.
Ms Davies attempted to add lifesaving skills to the new curriculum for Wales - which is planned to come into force from 2022 - through amendments to a law implementing the new system.
On Wednesday her amendments won the support of Labour MS Alun Davies, who suffered a cardiac arrest last year while jogging in a Cardiff park.
"It was a defibrillator that restarted my heart," he told the Senedd.
The Blaenau Gwent member said he was lucky enough that someone could cycle to get the device, which was in a college, "whilst the people performing CPR on me were able to keep me alive for that to happen".
"That doesn't happen and couldn't happen and wouldn't happen in too many parts of Wales," he said.
Ms Williams said in response that the statutory guidance to schools would in future say they "should also consider what strategies their learners will need to be able to safely intervene to support others who may be at risk".
"This should include lifesaving skills and first aid," she told the Senedd.
"I hope that this strengthened wording and this approach, which will, I hope, put it beyond doubt that this is a statutory element of the curriculum that must be provided to children and young people, will achieve what you have long campaigned for, Suzy, that children leaving our schools will have had the opportunity to acquire these skills."
Chances 'improve dramatically'
Ms Davies, who dropped her amendments following the minister's commitment, welcomed the changes.
She said: "From securing cross-party support for this in my early days as an Assembly Member, through several debates and pitches to different ministers, on to my own proposed legislation which found favour among Senedd members, it was difficult to understand why Welsh Government was so resistant.
"In this country, our chances of surviving a cardiac arrest outside hospital are as poor as 10%. In countries around the world where teaching CPR and defibrillator use is compulsory, those odds improve dramatically.
"These skills are quick and easy to learn, and easy to remember."
A Welsh Government spokesman said: "As part of the new curriculum, teachers will be able to focus on a wide range of health and well-being topics, including first aid.
"We have worked closely with partners, including the British Heart Foundation, in developing guidance and will continue to work with experts in this field as we refine the curriculum going forward."