Doing lots of exercise drastically cuts the risk of developing painful gallstones, UK researchers have found.
Gallstones are common but only 30% of cases have symptoms and complications.
A University of East Anglia study of 25,000 men and women found those who were the most active had a 70% reduced risk of those complaints.
The team, writing in the European Journal of Gastroenterology and Hepatology, said one reason might be reduced cholesterol levels in the bile.
They said exercise also raised levels of "good" cholesterol and help improves movement through the gut, all of which could contribute to the lowered risk.
Those taking part in the study were split into four groups depending on how much exercise they did and the researchers found that those who did moderate amounts of exercise also had a lower risk of painful symptoms from gallstones than those who were the most inactive.
They worked out that if everyone increased the amount of exercise they did by one category 17% of gallstones that need medical treatment could be prevented.
Using the same data the researchers had previously discovered that drinking a moderate amount of alcohol is protective against gallstones.
Consuming two units a day cuts the chance of developing gallstones by a third, the earlier study showed.
Gallstones form in the gallbladder from bile and are generally made up of hardened cholesterol.
It is thought that around one in three women and one in six men get gallstones at some point in their life but they are more common in older adults.
Other factors which increase the chances of them forming include pregnancy, obesity, rapid weight loss and some medications.
Many people who have gallstones may never know they have them but for some they cause severe pain, inflammation and infection and jaundice.
And almost 50,000 people have to have their gallbladders removed every year in the UK.
Study leader Dr Paul Banim, a clinical lecturer at the University of East Anglia and a specialist registrar in gastroenterology said: "It is difficult to prove a link between lifestyle and disease but we weren't surprised to see these results.
"If everyone was to achieve the impossible and do the same amount of exercise as those in the most active category, gallstones could be reduced by 70%."
Dr Charlie Murray, secretary of the British Society of Gastroenterology, said the study seemed to show a direct protective effect of higher levels of exercise.
"The study does not however tell us how much exercise is effective in prevention of gallstones as this would require specific recording of exercise activity, nor the mechanism by which exercise is protective.
"It does however demonstrate that as with the prevention of many disease processes, exercise improves your chances of staying healthy."