If you've had occasional sharp abdominal pain that passes quickly, you may have brushed it off as nothing but gas, constipation, or even stress. But this kind of pain can also indicate the presence of gallstones. These pellet-like accumulations in the gallbladder are surprisingly common, affecting as many as 42 million Americans. Gallstones are most prevalent among women, likely because the hormone estrogen increases risk, says Ray Sahelian, MD, a nutrition scientist in Marina del Ray, California. Newer studies have shown that both women and men with a high waist-to-hip ratio are more likely to develop this painful condition.

The trouble begins in the gallbladder, a small, pear-shaped organ located on the underside of the liver that releases bile — important for digesting fats — into the small intestine. In most cases, a gallstone forms when bile becomes oversaturated with cholesterol from the diet or from the body's natural production; the bile salts are no longer able to keep the cholesterol dissolved in liquid form, so it begins to clump together, eventually forming stones that can be as small as peas or as large as golf balls.

If gallstones are small enough, they may pass painlessly from the gallbladder into the intestines, where they're excreted unnoticed. But if stones grow in size and number, they can cause abdominal pain or inflammation of the gallbladder wall. Larger stones can lodge in the narrow opening of the duodenum (at the start of the small intestine), causing bile to back up into the pancreas, leading to pancreatitis, a life-threatening inflammation of the pancreas. For most people with gallstone symptoms, such as chronic pain, surgery is inevitable. But prevention is possible, say experts, and starts with diet.

Nutrition

Go vegetarian

Or at least eat fewer animal products. “A diet high in meat is also high in saturated fat — a known risk factor for gallstones — and lower in fiber, which protects against gallstones,” says Shari Lieberman, PhD, CNS, and author of The Real Vitamin and Mineral Book (Avery, 2007). Saturated fat increases cholesterol, the raw material from which gallstones are made. Another reason to eat less meat: Too much heme iron — the type found in meat — appears to be related to a higher risk of gallstones. Reduce your meat consumption to no more than two 3-ounce servings a week, and substitute with vegetable protein from beans and soy, says Lieberman.

Eat more greens

Kale, chard, spinach, and other leafy greens help protect against gallstones, as do vitamin C-rich fruits and vegetables, such as citrus fruit, strawberries, papaya, and peppers, as well as cruciferous vegetables, including broccoli and cauliflower. These important plant foods offer fiber, which lowers cholesterol, and nutrients that are key in producing enzymes to digest fat.

Lay off the carbs

Eating pasta, bread, and other high-glycemic-index carbs increases gallstone risk by boosting the body's insulin production and increasing the cholesterol content of bile. According to a 2007 study published in Surgery, a diet composed of 75 percent carbs from refined grains and sugars appears to increase risk of gallstone formation, compared with a diet containing 45 percent carbs. The best advice: Emphasize fruits, vegetables, legumes, and whole grains for healthy carbohydrates.

Keep eating nuts

Even though they're high in fat, you don't have to shun nuts; in fact, they reduce gallstone risk in men, according to the results of a large epidemiological study. In another study, women who ate at least 1 ounce of nuts weekly had a lower risk of developing gallstones that required surgery. Other plant-based, unsaturated fats, like olive and canola oil, offer the same benefits.

Lifestyle

Move it more

Regular exercise may prevent gallstones, possibly because of its effects on cholesterol. In one study, inactive women had a nearly 60 percent greater risk of developing gallstones than their active counterparts. For the best cholesterol-lowering effects, the American Heart Association recommends at least 30 minutes of brisk walking, bicycling, or swimming most days of the week.

Drink — a little

Small amounts of wine or beer may protect against gallstones. In one study published in the American Journal of Clinical Nutrition, an ounce of alcohol daily was related to a reduction in gallstone risk in women. And drinking two cups of coffee a day (happily, the caffeinated kind) may also prevent gallstones by increasing bile flow.

For supplements to help prevent gallstones, go to deliciouslivingmag.com/health and click on this story.