Depression is three times more common among people who have experienced a heart attack compared to people who have never been afflicted by one.
The study shows that people who exercise regularly for a long time before a heart attack occurs are far less likely to be depressed afterwards.
Researchers from Norwegian University of Science and Technology (NTNU) used the Nord-Trondelag HUNT studies that collected data from a total of 120,000 people during three periods (1984-86, 1995-97 and 2006-08).
In this way, researchers were able to see how exercise habits over several years affected how people felt after a heart attack.
More From This Section
"Physical activity protects people from depression after a heart attack," said Linda Ernstsen from NTNU.
The study group that was characterised as physically active exercised a minimum of 150 minutes per week with moderate intensity or 75 minutes with high intensity.
Researchers divided the survey participants into four groups. Among people who had never exercised, over 17 per cent were depressed after a heart attack. This was by far the most depressed group.
Among those who exercised during the first study period, but who had stopped in the second, 12.5 per cent were depressed after a heart attack.
Participants who did not exercise to begin with, but who did train during the second study period, fared better, with only 9.1 per cent suffering from depression in the aftermath of the heart attack.
"It is never too late to start exercising," said Ernstsen.
The findings were published in The American Journal of Medicine.