Taking certain oral antibiotics may come with an unpleasant side effect, according to new research.

A study published Thursday in the Journal of the American Society of Nephrology found that taking any of five types of oral antibiotics was associated with a significantly higher risk of developing kidney stones — mineral and salt deposits that form in the kidneys and must be passed through the urinary tract.

Kidney stones have grown much more common over the past few decades without a clear explanation as to why. The condition is, however, associated with bacterial changes in the intestines and urinary tract, leading investigators to study the relationship between antibiotics and kidney stones.

Researchers examined the electronic health records of more than 13 million people who sought care in the United Kingdom between 1994 and 2015. They narrowed the sample to nearly 26,000 patients diagnosed with kidney stones, and a control group of almost 260,000 people without kidney stones.

After adjusting for mitigating factors such as other medication use and being diagnosed with a urinary tract infection, diabetes or gout, they found that sulfas, cephalosporins, fluoroquinolones, nitrofurantoin/methenamine and broad-spectrum penicillins were all associated with a heightened risk of kidney stones, when taken three to 12 months before diagnosis.

Sulfas, which are often used to treat urinary tract infections and burns, were associated with the greatest uptick in risk: a 2.3-fold increase, compared to people who had not taken the medication. Risk did seem to decrease as time passed after taking these antibiotics, the researchers write, but it remained elevated for up to five years. Young people also seemed to be most susceptible to developing kidney stones after taking these medications, they add.

With evidence mounting that excessive antibiotic use can lead to drug-resistance and changes in the microbiome, the study provides another reason to be cautious of over-prescribing.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Jamie Ducharme at jamie.ducharme@time.com.