When an Amish child fainted after running around outside, the family’s physician was stumped. Results from an electrocardiogram and exercise stress test were normal, and no other cause was apparent.

But a few years later at age 12 — again while engaged in everyday physical activity — the child died of sudden cardiac arrest. And within months, a 10-year-old sibling died in similar fashion.

Over more than a decade, an additional 16 children from two extended Amish families would die before researchers pinpointed the culprit: a rare genetic mutation. The details were described this month in a study led by the Mayo Clinic, along with researchers from the Alfred I. DuPont Hospital for Children in Wilmington and other institutions.

Five more children with the inherited heart defect have been identified, though so far they have survived — in one case after receiving CPR, the authors wrote in JAMA Cardiology.

The affected families are spread across several states in the Midwest and East, said senior study author Michael J. Ackerman, a genetic cardiologist at Mayo in Rochester, Minn. So far the condition has not been identified in Pennsylvania, but previously researchers have identified a variety of other disease-causing mutations in the state’s Amish population.

That’s because the communities of Plain people, as they like to be called, are small, and husbands and wives are sometimes related by blood. That raises the risk that a child will inherit a given “recessive” mutation from both parents, causing a disease that would not occur if the mutation were present in just one parent.

The Mayo researchers suspected from the start that such a mutation was what had caused the Amish children’s hearts to stop beating. In particular, they focused on a gene known to regulate calcium — a crucial element in the proper function of heart cells.

But with the laboratory techniques available when the search began, in 2004, that gene appeared to have no errors in its code. Nor did any other genes that the researchers tested.

The problem turned out to be one of duplication. As more advanced techniques became available, the team found that while the calcium-regulating gene was “spelled” correctly, a large chunk of it was repeated, disrupting the control of calcium levels in ways that are not yet fully understood.

“We had the right gene in the bull’s-eye from the very beginning,” Ackerman said. “But initially … there was no mistake seemingly present."

The children all had the genetic duplication in both copies of their calcium-regulating gene — inheriting one copy from each parent. And the parents all were healthy.

“If you only have one duplication, and you’re a carrier, there’s no disease,” the Mayo’s Ackerman said. “You have to have the double dose.”

The mutation is unlikely to occur outside the Amish community, but it could represent a valuable contribution to the understanding of the heart’s electrical function, said University of Pennsylvania researcher Zoltan Arany, who was not involved with the study.

Other mutations in this gene are known to be involved in sudden cardiac arrest, but the way in which the duplication causes harm requires further study, said Arany, a professor of cardiovascular medicine at Penn’s Perelman School of Medicine.

“It’s a little mysterious exactly how it’s working,” he said.

The findings also serve as a reminder that sudden cardiac arrest can occur when no structural or electrical defect is apparent, Ackerman said. The Amish children who underwent electrocardiograms appeared normal, and autopsies of those who died revealed no sign of cardiomyopathy — an abnormal thickness in the heart muscle.

Yet their hearts suddenly stopped beating (as opposed to a heart attack, in which blood flow to the heart is blocked).

For families in whom the genetic duplication has been identified, the Mayo Clinic is offering genetic counseling, funded by a benefactor. A few people with the condition have opted to have a defibrillator implanted.

“The tagline is often that they’re averse to technology and so forth,” Ackerman said. “We’re not really seeing that.”

For those who choose not to get an implant, Mayo Clinic researchers are studying whether existing medicines might alleviate the problem.

Asked if people with the condition could simply be counseled to avoid intense physical activity, Ackerman rejected that notion, saying the children who died were not exerting themselves.

“We’re kind of racing against the clock,” Ackerman said. “It’s difficult to tell them to take it easy, because they were just living. We need to get this figured out as fast as we can.”