Putting on a few pounds over time may hurt the heart muscle, affecting long-term risk of heart failure, according to new research.

Researchers examined heart scans and body fat measurements of more than 1,200 heart disease-free adults, and then again seven years later. They found that those who gained even as little as 5 percent were more likely to have thickening and enlargement of the left ventricle, the muscle that pumps blood to the body. Their hearts also showed a subtle decrease in pumping ability.

“Any weight gain may lead to detrimental changes in the heart above and beyond the effects of baseline weight so that prevention should focus on weight loss,” said the study’s senior author Ian Neeland, M.D., a cardiologist and assistant professor of medicine at UT Southwestern Medical Center in Dallas.

“If meaningful weight loss cannot be achieved, the focus should be on weight stability,” he said.

Researchers caution that the study doesn’t mean that every person with weight gain will develop heart failure, but say that weight changes may affect the heart muscle in ways that can change its function. More research is needed to show if aggressive weight management could reverse the changes.

Heart failure affects more than 6 million U.S. adults and is a drain on quality of life, causing symptoms such as shortness of breath and fatigue. The condition is also expensive, with total costs estimated at $30.7 billion.

The study appears in the Journal of the American Heart Association.