Can you be fat and still be fit and healthy? The notion has been around for quite some time, but a new study begs to disagree. Even if you are a physically active person, activity can’t overcome the ill-effects being overweight or obese has on your health.

Past research has shown that weight gain and health problems go hand in hand. Being overweight or obese puts you at higher risk for heart attack, stroke, sleep apnea, osteoarthritis, type 2 diabetes, a lower quality of life and, not surprisingly, a shorter lifespan.

People who were active and obese had twice the risk of high cholesterol as people of normal weight, four times the risk of having diabetes and five times the risk of high blood pressure.

Information gathered from over 527,000 adults living in Spain was used to look at the relationships between body mass, activity levels and heart health. Thirty-two percent of the people studied were women and the average age of all the participants was 42 years.

Participants’ body mass index or BMI was used to group them as normal, overweight and obese. A normal BMI is 20-24.9, overweight is defined as a BMI of 25 to 29.9 and those with a BMI greater than 30 are considered obese.

People were also sorted by activity level. According to the World Health Organization, a person should engage in 150 to 300 minutes of moderate aerobic physical activity each week along with muscle-strengthening exercises two days a week. People who engaged in some exercise but less than the WHO recommendations were placed in the insufficiently active group, while those who did no exercise were classified as inactive.

Cardiovascular health was also measured using three major risk factors for heart attack and stroke, diabetes, high cholesterol and high blood pressure.

Most of the people in the study were of normal weight or overweight with 18 percent falling into the obese category. Only 24 percent were regularly active, while the bulk of the participants (63 percent) were inactive. High cholesterol was present in 30 percent of participants, high blood pressure in 15 percent and three percent had diabetes.

Any amount of physical activity was associated with less risk of high cholesterol, high blood pressure or diabetes at all BMI levels compared to people who were inactive. The risk of developing diabetes or high blood pressure went down as activity levels went up.

“This tells us that everyone, irrespective of their body weight, should be physically active to safeguard their health,” researcher, Alejandro Lucia, of the European University, said in a statement.

Less than a quarter of the over half million people in the study were active regularly, and most of the participants — 63 percent — were inactive.

“More activity is better, so walking 30 minutes per day is better than walking 15 minutes a day.”

Exercise did not seem to counteract the bad effects of carrying excess weight in men or women. Even with the benefits of physical activity, people who were overweight or obese were more likely than people of normal weight to be at cardiovascular risk — regardless of how active they were. Active people who were obese had twice the risk of high cholesterol as people of normal weight, four times the risk of having diabetes and five times the risk of high blood pressure.

The message is clear: to do right by your heart, you need to fight both obesity and inactivity.

The study is published in the European Journal of Preventive Cardiology.