A new study may be the push you need to finally get that gym membership: Exercise may improve your chances of surviving a heart attack.

It’s no surprise that exercise has tons of health benefits, from increasing lifespan to improving overall mental wellbeing. The study, published online now in the European Journal of Preventive Cardiology, found that being physically active could also increase your chance of surviving a heart attack by nearly 50 percent, Healthday reported.

Patients who had light levels of physical activity were 32 percent more likely to survive a heart attack than individuals who led a mostly sedentary lifestyle. And those with moderate/high physical activity levels were 47 percent more likely to survive a heart attack. Although it’s not clear exactly why working out protects against heart attack death, the team suggest it may be due to improved blood flow and stronger blood vessels.

Read: Heart Attack Signs You Need To Recognize To Save Your Life: Common And Uncommon Symptoms

"One possible explanation is that people who exercise may develop collateral blood vessels in the heart which ensure the heart continues to get enough blood after a blockage,” said study co-author Eva Prescott in a recent statement. “Exercise may also increase levels of chemical substances that improve blood flow and reduce injury to the heart from a heart attack.”

For the study, researchers from the University of Copenhagen in Denmark looked at exercise levels of 1,664 heart attack patients, 425 of whom died immediately afterwards, Healthday reported. Results showed that those who were more physically active were less likely to have died as a result of their heart attack.

According to the American Heart Organization, a heart attack occurs when the blood flow that brings oxygen to the heart is cut off or reduced severely. This is different from cardiac arrest that occurs when the electrical system of the heart is disrupted. Blood flow can be reduced and/or cut off when the arteries that carry blood to the heart become narrow due to a buildup of fat and cholesterol.

The team noted that this was strictly an observational study, and therefore you cannot conclude that exercise was the direct cause of heart attack survival. Still, Prescott added that given the already widely known health benefits of exercise, “continuing to exercise even after developing atherosclerosis [hardening of the arteries] may reduce the seriousness of a heart attack if it does occur."

Source: Ejlersen H, Jovanovic Anderson Z, von Euler-Shelpin MC, et al. Prognostic impact of physical activity prior to myocardial infarction: Case fatality and subsequent risk of heart failure and death. European Journal of Preventive Cardiology . 2017

See Also:

At Risk For A Heart Attack? You May Have Been Added To New Expanded Criteria Without Realizing It

Early Signs Of Heart Conditions: How To Recognize Symptoms Of Cardiac Arrest, Angina, Stroke, And Heart Failure