Many of us watching the Olympics are feeling inspired now to exercise harder and more often. But exercise scientists have long been intrigued — and worried — by the question of whether, over months and years, someone can exercise too much. It has not been clear if there is a safe upper limit to exercise beyond which you can irreparably injure your body, and in particular your heart.

A new study of former Olympians and other athletes should help to allay some of the lingering uncertainties about the effects of long-term, intensive training. Its findings suggest that while such training can substantially change how the heart is shaped, it does not seem to cause lasting damage to the heart’s function.

The results from some past studies of heart health in serious endurance athletes have been worrying. A 2011 study, for example, of male entrants at an annual marathon cross-country ski race in Sweden revealed that the most committed participants — those who had completed the race the most times during a 10-year stretch or finished with the fastest times — were far more likely than their more infrequent or leisurely fellow racers to develop atrial fibrillation, or A-fib, during a multi-year follow-up period. Atrial fibrillation is a disruption of the heart’s natural rhythm affecting the heart’s upper chambers, the atria, and is linked to an increased risk of stroke.

The study’s authors speculated that, although they couldn’t prove cause and effect, it seemed possible that the serious athletes’ strenuous training had contributed to their subsequent heart problems.

Another, even more provocative study published in 2012 looked directly at the hearts of long-term competitive athletes. Using advanced scanning techniques, its authors mapped the shape and function of the heart muscles of 40 elite male masters athletes both before and immediately after a long endurance race, such as a marathon or ultra-marathon, and then again a week later.

The scans showed evidence of what seemed to be lingering damage to the athletes’ hearts, the scientists reported. Their right ventricles, one of the two lower chambers of the heart, were noticeably enlarged and did not function as well as the left ventricles both immediately after the marathon-style event and a week later. The right ventricles pumped considerably less blood than would be expected from a completely healthy heart.

These effects on the athletes’ hearts seemed so pronounced and persistent that the scientists decided that the condition was pathological and gave it a name, “exercise-induced arrhythmogenic right ventricular cardiomyopathy,” which basically translates as unhealthy — and probably permanent — changes to the heart caused by exercise.

The study was much discussed among exercise cardiologists, but some were skeptical of its conclusions, suspecting that the seeming damage to the heart muscle after endurance events was likely to be ephemeral, like sore leg muscles, and should similarly resolve with time.

So for the new study, which was published in May in Circulation, scientists at Saarland University in Germany decided to look at the hearts of long-term endurance athletes when they were training but not competing and compare their cardiac muscles to those of men of the same age who were not athletes.

If years of strenuous exercise and competition permanently damaged the athletes’ hearts, that damage would be visible even if they had not recently completed an event, the scientists hypothesized.

To test that idea, the researchers rounded up a group of 33 extremely accomplished older endurance athletes, including six former Olympic triathletes and rowers, a one-time Ironman world champion, a cyclist who once had almost won the multi-week Tour of Spain and a former winner of the Munich Marathon. They ranged in age from 30 to 60. These were men who had trained strenuously for years and continued to work out for about 17 hours or more weekly. (No women were included since previous studies of athletes’ hearts had focused on men and the scientists wished to be able to compare their data to past results.)

The athletes underwent a battery of tests at the scientists’ lab, including measures of their aerobic fitness and, most important, of the state of their hearts. Various high-tech scans looked at both the shape and function of that muscle.

Meanwhile, 33 men of the same ages who were healthy but not particularly physically active completed the same tests.

The results showed that the athletes had remarkably different hearts than the other men, particularly their right ventricles, which were considerably larger than among the nonathletes, just as in the earlier study of masters athletes. Their left ventricles also were relatively enlarged though not to the same extent.

But the scientists saw no signs that these differences affected the hearts’ function. Unlike in the earlier study, the athletes’ right ventricles pumped just as much blood as would be expected and otherwise behaved normally and, in some ways, better than normal. The athletes in general had very low resting heart rates, which is considered a sign of cardiac health, and no symptoms of atrial fibrillation.

The heart scans also revealed no scarring in the athletes’ heart muscles, which would indicate long-term damage.

Over all, “we found no evidence of lasting damage, pathological enlargement or functional impairment of either the right or left ventricle in the athletes who had been doing long-term, intensive, elite-level endurance exercise,” said Dr. Philipp Bohm, a sports medicine physician and researcher at Saarland University who led the study.

He and his colleagues suspect that their results differ from those of the 2012 study because that experiment examined athletes’ hearts immediately after a draining race, when their muscles were still exhibiting race-related wear and tear.

The new study intimates that any such harm is likely to be short-term and not worrisome.

But Dr. Bohm and his colleagues also said that much more research is needed to settle the issue of just how much exercise is safe. Their study was small and focused on a highly specialized group of athletes, who might somehow be lucky or genetically blessed. Much larger, long-term experiments are needed before researchers can know whether everyone’s hearts respond similarly to Olympic-level exercise, he said.

It’s also important to know that being fit does not immunize anyone against heart disease or sudden cardiac arrest, Dr. Bohm said. If your chest hurts during exercise, see a cardiologist.