For lifelong heart health, start exercising early in life and keep exercising often — ideally, at least four times a week, according to a remarkable series of recent studies involving hundreds of people and their hearts.

But even if you have neglected to exercise in recent years and are now middle-aged, it is not too late. The same research shows that you still can substantially remodel your heart and make it more youthful by starting to work out in midlife, provided you exercise often enough.

By the time many of us are in our mid to late 50s, portions of our heart muscle have begun to atrophy and weaken, and our major cardiac arteries — the vessels that move blood from our hearts and to the rest of the body — have stiffened.

These changes increase blood pressure and make our hearts work harder and less well, raising the risk for subsequent health problems, including heart failure.

But Dr. Benjamin Levine, a cardiologist and professor of medicine at the University of Texas Southwestern Medical Center and director of the Institute for Exercise and Environmental Medicine in Dallas, was not convinced these effects were inevitable.

He and his research colleagues wondered if the effects might be common only among aging people who are sedentary and not among those who are physically active.

So they embarked on a series of examinations of people and their cardiac systems.

For the first of these, published in 2014 in The Journal of the American College of Cardiology, they turned to 102 older men and women who were part of a large-scale, continuing study of heart health. All had provided detailed information about their physical activities for at least the past 20 years.

The scientists then categorized these men and women, based on those exercise histories.

Some had been sedentary throughout adulthood. Others, who reported that they had and continued to exercise two or three times a week for at least 30 minutes, were dubbed long-term “casual” exercisers.

A third group, who had worked out four or five times a week for years, were classified as “committed” exercisers.

And a fourth group, who exercised six or seven times a week and competed in sports, were marked as athletes.

The researchers then scanned and tested everyone’s hearts.

They found that members of the sedentary group showed the usual effects of time. Parts of their heart muscles, particularly their left ventricles or chambers, were shrunken and less powerful than in younger people.

The same changes were evident in casual exercisers.

But they were not seen to the same extent in men and women who had exercised at least four times a week for years, or in those who were masters’ athletes. Both of those groups had left ventricles that looked and functioned much like those of people decades younger.

To extend those findings, the researchers next turned to cardiac arteries, which, like the heart muscle, typically become less healthy with age.

For a study published this month in The Journal of Physiology, the scientists assessed the stiffness and relative age of the major cardiac arteries in about 100 additional adults, most of them in their 70s and who, as in the earlier study, had provided regular reports about their exercise habits for at least two decades.

The researchers again grouped them into the four categories, based on how frequently they exercised.

And again, the scientists noted considerable differences in cardiac health, depending on how often the men and women had been physically active during adulthood. In general, the cardiac arteries of both the sedentary people and the casual exercisers, who worked out two or three times a week, were stiffer than in younger people.

But among long-term committed exercisers and masters’ athletes, the researchers found, major cardiac arteries were relatively flexible and, in functional terms, youthful and healthy, compared with the vessels in the other groups.

Which would be good news, except that those studies looked at people who had been exercising for decades. The results could not tell us whether people who have reached middle age without exercising could, at that point, begin and still change the structure and function of their hearts.

So, for perhaps the most important of the recent studies, which was published in April in Circulation, Levine and his colleagues had a group of sedentary middle-aged men and women start exercising four or five times a week, while another group began stretching and balance training as a control.

The exercisers completed at least one session a week of brief but strenuous intervals, while their other workouts were moderate, such as brisk walking or jogging, and lasted for 30 minutes or longer.

The groups continued their routines for two years, by the end of which the exercisers were fitter than they had been. Those in the control group were not.

More notably, the left ventricles in the exercisers’ heart muscles were stronger and less stiff than at the start of the study. Their hearts, in effect, were more youthful now.

These results suggest that our hearts can “retain plasticity” deep into middle age, Levine said, meaning that they still can change in desirable ways if we exercise.

But the exercise most likely needs to occur at least four or five times a week and continue for years, he said.

“It is a commitment,” he said. “But I tell people to think of exercise as part of personal hygiene, like brushing their teeth. It should be something we do as a matter of course to keep ourselves healthy.”