A new study from John Hopkins University School of Medicine revealed that exercising outside, while exposed to the sun, can have a positive effect on an indvidual's heart health.

The study, published in the Journal of Clinical Endocrinology & Metabolism, showed that exercise and good vitamin D levels have a "synergistic" relationship that helps reduce the risk of heart attacks and strokes.

"In our study, both failure to meet the recommended physical activity levels and having vitamin D deficiency were very common," said Erin Michos, M.D., M.H.S., associate director of preventive cardiology and associate professor of medicine at the Ciccarone Center for the Prevention of Heart Disease at the Johns Hopkins University School of Medicine, in a press release. "The bottom line is we need to encourage people to move more in the name of heart health."

For the study, the researchers analyzed the survey responses and health records of more than 10,342 adults Americans included in the Atherosclerosis Risk in Communities study. All the 10,342 respondees were free from heart and vascular diseases at the beginning of the study.

The researchers asked each participant to self-report their exercise levels, or the time they spent on exercising each day. The John Hopkins team also measured the vitamin D levels in the blood of the participants.

The researchers observed a direct relationship between exercise levels and vitamin D levels. The higher the reported exercise levels, the higher the vitamin D levels in the blood. Interestingly, the researchers found that the participants who have the highest vitamin D levels have the lowest risk for future cardiovascular disease.

Participants who met the recommended activity levels imposed by the American Heart Association and have a vitamin D levels above 20 nanograms per milliliter in their blood. They were also 23 percent less likely to develop adverse cardiovascular event compared to those with poor physical activity and low vitamin D levels. Surprisingly, people who had adequate exercise but have low levels of vitamin D in the blood didn't have reduced risk of cardiovascular events.