But while higher levels of calcium from food intake may yet prove to be good for the heart, research suggests that the same does not hold true for calcium purchased over the counter. A study from 2010, for example, a large meta-analysis that looked at data on more than 8,000 adults over four years, found that those who were taking calcium supplements — a minimum of 500 milligrams a day — had nearly a 30 percent greater risk of heart attack than those who were not.

Researchers caution that dietary studies can be unreliable, since so many factors come into play, and people may not recall their dietary or supplement-taking histories accurately in questionnaires. In addition, the findings reflect a correlation, which does not necessarily mean causation when it comes to linking certain foods or nutrients with a particular health outcome.

The latest study, published online in the journal Heart, was the largest and most detailed to date on calcium intake and disease, involving more than 24,000 people who were taking part in a large continuing analysis called the European Prospective Investigation Into Cancer and Nutrition. The subjects, ages 35 to 64 at the start of the research, were followed for 11 years and questioned about things like their health, their food intake and their supplement use.

In an attempt to rule out or minimize the effects of other factors that contribute to heart disease and could complicate the results, the authors took into account age, physical activity, body mass index, diet, and alcohol and cigarette use when conducting their analyses. After adjusting for these factors, they found that people who had what they called a “moderate” intake of calcium — 820 milligrams a day of calcium from all sources, both dietary and supplements — had a roughly 30 percent lower risk of a heart attack than those with the lowest calcium intake. People who had had a greater intake, above 1,100 milligrams daily, did not see their risk lowered any further.

But looking specifically at supplements presented a more alarming picture. People who got their calcium almost exclusively from supplements were more than twice as likely to have a heart attack compared with those who took no supplements. The researchers speculated that taking calcium in supplement form causes blood levels of the mineral to quickly spike to harmful levels, whereas getting it from food may be less dangerous because the calcium is absorbed in smaller amounts at various points throughout the day.

The authors of the study said their findings indicate that people getting their calcium from supplements should do so “with caution.”

“Sufficient calcium intake is important, but my recommendation would be to get calcium from food, like low-fat milk and dairy products and mineral water rich in calcium, rather than from supplements,” said Dr. Sabine Rohrmann, an author of the study and a professor with the Institute of Social and Preventive Medicine at the University of Zurich. Health authorities recommend that most adults get about 1,100 milligrams a day.

An editorial that accompanied the study reflected a similar sentiment, saying that the safety issues and doubts swirling around calcium supplements should lead doctors and health officials to discourage their use.

“We should return to seeing calcium as an important component of a balanced diet,” the editorial stated, “and not as a low-cost panacea to the universal problem of postmenopausal bone loss.”