We have all heard that if we want to lower our chance of dying prematurely from a heart attack or stroke, we should exercise and maintain a healthy weight. But which of the two is more important?

New research suggests that good fitness trumps maintaining your weight.

The finding comes from a study published in the journal Circulation, which looked at almost 14,400 middle-aged men and then tracked them over 11 years. The men underwent full physicals at least twice during the first six years of the study.

During that time, 1,214 men died – 300 of them from a cause related to heart disease.

Those who became more fit during the study period (as measured by aerobic intensity test on a treadmill), or those who maintained their fitness were at lower overall risk of dying from heart disease or dying from any cause.

This was true even if their weight stayed the same or went up, compared to men whose fitness levels dipped over time.

On its own, a change in weight was not associated with an increased death risk. But those who became less fit over the study period were indeed at increased risk of dying from heart disease, regardless of whether their weight changed.

Lead researcher Duck-chul Lee, a physical activity epidemiologist at the University of South Carolina's Arnold School of Public Health, says the findings are good news for people who are physically active but can't seem to lose weight.

"You can worry less about your weight as long as you continue to maintain or increase your fitness levels," he said in a statement.

It's also a reminder to those who are at a healthy weight but whose fitness is falling that they are still at an increased risk of early death.

The researchers were able to quantify the benefits of increasing your fitness level through mid-life. They found that every unit of increased fitness in the men over six years was tied to a 19 per cent lower risk of heart disease and stroke-related deaths. It was also linked to a 15 per cent lower risk of death from any cause.

The researchers accounted for other factors that could have affected their results, including age, family history of heart disease, beginning fitness level, changes in lifestyle factors such as smoking, and medical conditions such as high blood pressure or diabetes.

It's important to note that about 90 per cent of the men in the study were either normal weight or overweight at the beginning of the study. Few met the definition of obese.

The researchers say that alone could be a key factor to their findings.

If there had been more obese people in the study, changes in weight might have had a significant effect on death risks. Lee said it's unclear whether these results would apply to severely obese people.

The men who took part in the study were an average 44 years old when the study began. Most were white and middle or upper class. While women would likely have similar results as the men in the study, Lee said it's unclear whether the results apply to other racial and socioeconomic groups.

The study was funded by the U.S. National Institutes of Health and an unrestricted research grant from Coca-Cola. The company had no influence on the study's design or findings.