If 50 men run 3,510 marathons over the course of three decades, will their heart health suffer or improve?

A new study delving into precisely that question concludes that the answer is simultaneously reassuring and complicated, with long years of endurance training seeming not to harm runners’ hearts, but also not necessarily to benefit them in the ways that the runners themselves probably expected.

During the past 40 years or so, attitudes about the effects of strenuous exercise on the heart have whipsawed. At one point, many people believed that endurance exercise would be a panacea for heart problems. A 1977 report in the Annals of the New York Academy of Sciences, for example, intimated that marathon running and a healthy diet would immunize runners completely against atherosclerosis, or the buildup of plaques in the arteries that is the hallmark of heart disease.

But after some runners died of heart attacks, including, famously, Jim Fixx, author of “The Complete Book of Running,” in 1984, many scientists, physicians and athletes began to worry that long-term, strenuous exercise might actually be bad for the heart.

It was in hopes of bringing more clarity to the increasingly tangled question of how endurance training affects hearts that researchers from the University of Minnesota, Stanford University and other institutions decided, for the new study, to zero in on a unique group of runners: men who had participated in at least 25 consecutive Twin Cities Marathons.

These 50 runners, identified by marathon participation logs, turned out to have completed, collectively, 3,510 marathons, with each runner, individually, having finished anywhere from 27 to 171 of the races.

The men obviously were experienced endurance athletes. They had trained for at least 26 years, and some for more than 50. Many had started competing in high school or earlier, but others had come to the sport much later, often, the researchers report, in hopes of ameliorating the effects of smoking and junk food diets. Most were lean at the time of the study, but a few qualified as overweight, based on their body mass indexes.

Most ran 30 miles per week or more.

The researchers had each of these runners fill out detailed questionnaires about their training routines, as well as their general health history and habits. Then they scanned the runners’ hearts to look for atherosclerosis.

Sixteen of the runners had no plaque in their arteries. The rest had some deposits, with 12 displaying slight amounts, another 12 moderate levels, and 10 having worrisomely large deposits of plaques.

When the scientists compared the men’s running histories with their scan results, however, they found little relationship between how much they had run overall and how much plaque they had in their arteries.

On the other hand, a history of heavy smoking and high cholesterol was linked to greater levels of plaque, especially in the men who had begun running later in life.

The good news was that these findings suggest that years of hard running had not harmed the men’s hearts, said Dr. William O. Roberts, a professor of family and community medicine at the University of Minnesota, who led the study, which was published in Medicine & Science in Sports & Exercise. Indeed, all that running probably helped to keep some runners’ arteries clear.

But the exercise also had not inoculated those with a history of unwise lifestyle choices, especially smoking, against developing heart disease.

“You can’t just outrun your past,” Roberts said.