A new study published in the Journal of the American College of Cardiology suggests that older adults with heart disease who regularly exercise, even a little bit, may live longer than they would without any physical activity.

Researchers examined three decades of data on 3,307 adults who had been diagnosed with coronary heart disease after myocardial infarction or an episode of severe angina. By the time half of the patients had been in the study for at least 15 years, 1,493 of them had died.

Compared to people who were inactive, participants who consistently got the minimum recommended amount of exercise for adults were 36% less likely to die during the study. If these very active people scaled back their workouts over time, they were still 26% less likely to die than sedentary individuals.

People who consistently exercised, though less than the average, were still 19% less likely to die than sedentary participants. And if these less active individuals stopped exercising during the study they were still 18% less likely to die than people who never exercised at all.

“The take-home message for patients is that they should keep on moving,” Moholdt said by email. “And even if they have been inactive so far, it is never too late to start,” said lead study author Trine Moholdt, a researcher at the Norwegian University of Science and Technology in Trondheim.

The World Health Organization recommends that adults aged 18 to 64 get at least 150 minutes of moderate-intensity aerobic exercise or at least 75 minutes of intense activity every week. Ideally, each exercise session should be at least 10 minutes long.

Moderate activities can include things like walking, gardening, ballroom dancing, water aerobics, or taking a leisurely bike ride. Vigorous exercise includes things like jogging, lap swimming, and cycling at a pace of at least 10 miles an hour, according to the American Heart Association.

Losing weight didn’t appear linked to better survival odds, researchers report. Instead, people who lost weight were 36% more likely to die of cardiovascular disease during the study. Gaining weight wasn’t associated with higher odds of premature death.

“We have known for decades that maintaining a healthy weight and being physically active were independently associated with lower risks of experiencing a coronary heart disease event or of dying from any cause,” said Claude Bouchard of the Pennington Biomedical Research Center in Baton Rouge, Louisiana.

This study offers fresh evidence that it matters how people lose weight, Bouchard, author of an accompanying editorial, said. “There is no doubt that weight loss or weight maintenance programs that incorporate exercise are healthier than programs based solely on caloric restriction, even though the latter carries also multiple health benefits.”