Just before Thanksgiving, a patient visited gastroenterologist Patrick Hyatt, M.D., with a familiar story. 

The patient had occasional heartburn. After lots of wine or spicy food, the burning sensation would settle into his chest. He’d pop a Tums and get on with his day.

But then he started having trouble swallowing. That’s when he went to see Dr. Hyatt at Mercy Medical Center in Baltimore.

His diagnosis: esophageal cancer. It had already metastasized to his liver.

Cases like this are why Dr. Hyatt wants people to talk to their doctors about heartburn.

Related: The Fastest Cure for Heartburn 

Acid reflux can actually cause cancer—but if you seek treatment early enough, the cancer is completely preventable.

When stomach acid backs up into your esophagus, it causes the pain you know as heartburn. The feeling subsides after a while, but the acid can do lasting damage to the lining of your esophagus, Dr. Hyatt says. 

If that happens often enough over time, the cells that line your esophagus will be replaced with cells that are more resistant to stomach acid—a condition called Barrett’s esophagus. 

Those cells are more likely to turn precancerous, and eventually, cancerous, says Dr. Hyatt.

Men are particularly at risk: They’re three to four times as likely to develop esophageal cancer as women are, according to the American Cancer Society.

Related: Top Cancer Doc Gives 5 Lifestyle Strategies That Help You Avoid Cancer 

It’s still rare, though. Nearly half the population experiences heartburn, while only .5 percent of people ever develop esophageal cancer, according to the National Cancer Institute.

Talk to your primary doctor if you fit any of these criteria:

• You get heartburn more than once a week
• You’re 50 or older and get heartburn once a week or more often
• Heartburn medications no longer relieve your symptoms
• You have trouble swallowing
• You vomit when you’re not sick or you vomit blood

Your doc may refer you to a gastroenterologist to screen you for Barrett’s esophagus. 

If you have the condition, your specialist will follow up with you annually to see if your cells have become precancerous. 

But a minimally invasive procedure can return your esophagus to normal, eliminating your risk for esophageal cancer, Dr. Hyatt says.

If you don’t have Barrett’s esophagus—but still get frequent heartburn—take these steps to prevent acid reflux from doing lasting damage.

Avoid triggers: If copious amounts of wine always gives you heartburn, stop drinking copious amounts of wine. And don’t lie down for three hours after eating a meal.

Lose weight: Being overweight increases your risk of heartburn because belly fat puts pressure on your stomach, making the acid more apt to spill up into your esophagus, says Dr. Hyatt. Many people are able to stop taking heartburn medications when they lose weight, he says. (For a 28-day exercise program that will melt your gut, check out the Get Back in Shape Workout DVD.)

• Pop a pill: Your doctor may put you on a proton-pump inhibitor drug like Prilosec or Nexium. These daily pills stop the production of stomach acid, preventing acid reflux.