Anyone can develop a peptic ulcer, and the most common symptom is abdominal pain, according to the Mayo Clinic. Peptic ulcers may be caused by a bacterial infection, certain drugs, or rare tumors. They are not caused by stress or spicy foods.

Types of Peptic Ulcers

The most common kinds of peptic ulcers are named based on the location where they occur. These include: Gastric Ulcers A common type of ulcer, these occur on the inside of the stomach. Duodenal Ulcers These are located in the upper part of the small intestine, called the duodenum. Esophageal Ulcers These occur inside the esophagus, the tube that carries food from your throat to your stomach. You can have more than one type of peptic ulcer at the same time. The abdominal pain can occur anywhere from your navel up to your breastbone, and it may follow any of these patterns:

Feels worse when your stomach is emptyFeels better temporarily when you eat or take an antacidGets worse at nightComes and goes for days or weeks

Less commonly, a severe or complicated peptic ulcer may cause the following symptoms:

Nausea or vomitingVomiting red or dark bloodBloody, black, or tar-like stoolsUnexplained weight lossChanges in your appetiteDifficulty breathingFeeling faint or weak

In fact, the most common causes of ulcers are:

Use of nonsteroidal anti-inflammatory drugs (NSAIDs), such as aspirin, Advil or Motrin (ibuprofen), and Aleve (naproxen), which can damage the inner lining of your digestive tractHelicobacter pylori, a type of bacteria that can infect your stomach

Certain factors may put you at greater risk of developing a peptic ulcer, including:

Taking high doses of NSAIDsTaking NSAIDs regularly over a long period of timeTaking both NSAIDs and corticosteroids, medications that may be prescribed to treat asthma, arthritis, or lupusBeing femaleBeing 70 or olderSmokingDrinking alcoholHaving a history of peptic ulcers

In very rare cases, peptic ulcers may be caused by a condition called Zollinger-Ellison syndrome (also known as gastrinoma). It occurs when a tumor of acid-producing cells forms in the digestive tract, producing an excessive amount of acid that damages nearby tissue. Other rare causes of peptic ulcers may include serious illness, surgery, or medications other than NSAIDs, according to the Cleveland Clinic.

Lab Test A stool test or a breath test may be used to determine whether H. pylori bacteria are present in your body.Endoscopy During this procedure, a hollow tube with a camera will be passed down your throat to your esophagus, stomach, and small intestine. It allows your doctor to look for a peptic ulcer and take a biopsy (tissue sample) if one is present.Barium Swallow For this test, you’ll swallow a white liquid containing barium, which coats your digestive tract to make ulcers more visible in a series of X-rays of your upper digestive tract.

Ulcers caused by H. pylori will heal when the bacteria is killed. The typical course of treatment includes two weeks of antibiotics, along with acid-suppressing medicine. This is usually followed by an additional four to eight weeks of acid-suppressing medicine alone. It’s possible for an ulcer to heal temporarily without antibiotics, but it will likely recur — or another one will form nearby — if the bacteria are not killed. Duodenal ulcers take roughly six weeks to heal. Gastric ulcers tend to heal more slowly, taking two or three months to heal completely in cases where there are no other complications.

Medication Options

If your peptic ulcer is found to be caused by an H. pylori infection, your doctor will prescribe antibiotics to kill the bacteria in your digestive tract. Over-the-counter antacids like Mylanta, Maalox, or Tums can help you feel better, but they will not heal ulcers. If left untreated, complications from ulcers can occur. Proton pump inhibitors (PPIs) are drugs that block acid production and promote healing of peptic ulcers. PPI drugs include:

Esomeprazole (Nexium)Lansoprazole (Prevacid)Omeprazole (Prilosec, Zegerid)Pantoprazole (Protonix)Rabeprazole (Aciphex)

Acid blockers, also called H2 blockers, reduce acid production and heal ulcers. These include:

Cimetidine (Tagamet)Famotidine (Pepcid)Nizatidine (Axid)Ranitidine (Zantac)

Another option that your doctor may prescribe is a cytoprotective agent — a drug that protects the lining of your stomach and small intestine, which can help relieve symptoms of an ulcer.

Alternative and Complementary Therapies

Certain lifestyle changes may help you recover from a peptic ulcer:

Watch your diet. If you know that there are specific foods that make your ulcer feel worse, avoid them until your treatment is over. For many people, those include alcohol, caffeine, fatty foods, spicy foods, and chocolate.Stop smoking. Ulcers take longer to heal, and medications for ulcer treatment may be less effective, if you are a smoker. Scientists don’t know exactly why smoking has those effects.Use pain medications with caution. Pain relievers known as NSAIDs, which include aspirin, ibuprofen, and naproxen, can slow ulcer healing even if they didn’t cause your peptic ulcer. Acetaminophen (Tylenol) does not cause ulcers, so it may be a good substitute. Be sure to talk to your doctor before taking any of these medications; they may continue putting you on a PPI drug to prevent ulcer recurrences.

Prevention of Peptic Ulcers

Limiting your use of NSAIDs may help prevent peptic ulcers. Taking an alternative pain reliever, such as acetaminophen, may help you avoid NSAIDs. If you need to take an NSAID, opt for the lowest effective dose and take it with a meal. Peptic ulcers caused by an infection with H. pylori are not usually preventable. Limiting alcohol and avoiding smoking may also help prevent peptic ulcers.

Internal Bleeding Ulcers can cause bleeding that occurs quickly or slowly over time. Gradual bleeding can lead to anemia (inadequate red blood cells), while sudden bleeding often requires immediate hospitalization, potentially including a blood transfusion.Perforation (Hole) in the Stomach Wall If an ulcer eats through your stomach wall completely, you’ll be at risk of an infection in your abdominal cavity (peritonitis), which may be life-threatening.Obstruction Swelling or scarring related to your ulcer can block the passage of food through your digestive tract. If that happens, you may feel full quickly or vomit when you eat, and you may lose weight, according to the Mayo Clinic.

Symptoms of a severe or complicated peptic ulcer may include:

Blood (black or red) in your stoolBlood in your vomit, or vomit that looks like coffee groundsIncreasing painWeaknessMental confusionSevere abdominal distension (outward swelling)

If you think you or someone you know is having an ulcer emergency, seek immediate medical attention. Infection with H. pylori is less common in wealthier countries such as the United States, and it typically affects older adults more than younger ones. Treatment for Zollinger-Ellison syndrome may include surgical removal of tumors, chemotherapy, or taking drugs to control excess stomach acid. This is a professional association of gastroenterologists and other gastrointestinal professionals. Its site offers an abundance of information on peptic ulcers, including information on diagnosis and treatment, as well as a glossary of medical terms associated with the condition. National Institute of Diabetes and Digestive and Kidney Diseases This is a great resource for learning more about peptic ulcers. The site also offers advice on diet and nutrition, and it provides a link to search for clinical trials related to the condition. Additional reporting by Quinn Phillips