People with a history of kidney stones may have a higher risk of recurrence if they use calcium supplements, a new study finds. The findings, based on records from more than 2,000 patients, add to evidence linking calcium supplements to kidney stone risk. But researchers also said that people taking calcium under a doctor’s advice should not stop on their own.

“We’re definitely not advocating that people stop taking calcium supplements if their doctor prescribed them for their bone health,” said Christopher Loftus, the lead researcher on the study and an M.D. candidate at the Cleveland Clinic Lerner College of Medicine.

Loftus is scheduled to present his findings next month at the American Society of Nephrology’s annual meeting in San Diego. Data and conclusions presented at meetings should be considered preliminary until published in a peer-reviewed medical journal.

kidney stones develop when high levels of crystal-forming substances — such as calcium, uric acid and a compound called oxalate — build up in the urine. Most kidney stones contain calcium.

Doctors used to advise people who are “stone formers” to cut down on their calcium intake, said Dr. Mathew Sorensen, an assistant professor of urology at the University of Washington in Seattle.

And while that “makes sense intuitively,” Sorensen said, research since the 1990s has indicated the opposite is true: People can help lower their risk of kidney stone recurrences by getting the recommended amount of calcium — if the calcium comes from food.

Calcium supplements, on the other hand, have been tied to an increased risk of kidney stones in some studies.

Loftus said supplements have been linked to higher odds of passing a large stone that causes painful symptoms. Often, though, small stones pass unnoticed, so Loftus and his colleagues looked at whether supplement users had a greater risk of forming stones at all based on CT scans.

The researchers looked at records for more than 2,060 people with a history of kidney stones who underwent two CT scans within two years. Almost 1,500 of those patients were on calcium supplements, while 417 took vitamin D only. The rest used no supplements.

While researchers only saw an association, they found that calcium users had a faster rate of new stone formation than either of the other two groups.

People may be confused by the finding, given that calcium in food helps prevent kidney stones, Loftus said.

“But there’s a difference between dietary calcium and supplements,” he said. “When people eat calcium-containing foods, they’re getting other nutrients at the same time.”

Many foods contain at least a small amount of the compound oxalate, for example. “The oxalate in food binds to calcium, and you excrete it,” Loftus said.

Still, some people might need supplemental calcium for the sake of their bone density.

So if a doctor has advised you to take calcium, do not simply stop on your own, Sorensen said.

“In general, it’s best to get your calcium from food,” Sorensen said. “But if you’re on a supplement that’s been prescribed to protect your bones, we usually recommend taking it along with a meal.”

Loftus agreed. He added, though, that stone formers who started using calcium supplements on their own might want to ask their doctor whether that’s really necessary.

The findings come in the wake of a study from New Zealand that concluded extra calcium — either in food or supplements — may not help aging bones at all. That study was published in the BMJ.

Sorensen offered some advice for people with a history of kidney stones: “The most important thing,” he said, “is to drink enough fluid every day.”

That keeps the urine diluted, and helps flush away materials that can form stones. Typically, stone formers should aim for 2 to 3 liters of water and other fluids each day, according to the U.S. National Institutes of Health.

Cutting back on sodium is also wise, Sorensen said, since sodium causes the kidneys to excrete more calcium into the urine.

Stone formers could also try limiting their intake of meat and other animal proteins, Sorensen said, since those foods might contribute to calcium stones by making the urine more acidic.

People who form another kind of kidney stone — uric acid stones — are often advised to limit their meat intake to 6 ounces per day, the NIH says.