Scientists have analysed a cell found in heart scar tissue which could cause increased risk of cardiac arrest.
Myofibroblasts cells in patients might increase the likelihood of an electrical "short circuit".
"Cells recruited to the heart to repair damaged tissue might also be the cause of post-attack arrhythmia," said Prof Chris George.
The university's molecular cardiology team has led an international team of experts in the research funded by the British Heart Foundation which has also found myofibroblasts can cause irregular heart rhythms which can lead to sudden death in post-attack patients.
In Wales, around 50,000 people alive today have survived a heart attack and the latest findings could lead to an improved diagnosis for victims and better treatments.
"The number of myofibroblasts that infiltrate into damaged areas of the heart is quite amazing," said Prof George.
"To be able to also show that there's a link between the number of these myofibroblasts and the onset of arrhythmia lays the foundations for developing new approaches to prevent post-heart attack rhythm problems in patients."
Ruth Coombs, head of BHF Cymru, added: "By investing in research in Wales today, we're making tomorrow's tests and treatments for heart conditions possible."
Research at Swansea University could help predict further attacks and detect problems in heart attack patients.