Skip to main content

Stomach or Peptic Ulcers and a Helicobacter pylori Infection

Linda Crampton is an experienced teacher with a first-class honors degree in biology. She writes about the scientific basis of disease.

Helicobacter pylori (stained brown) in a sample taken from a person's stomach lining (stained blue)

Helicobacter pylori (stained brown) in a sample taken from a person's stomach lining (stained blue)

Stomach Bacteria and Ulcers

A bacterium named Helicobacter pylori lives inside the stomach of many people. For some of these people, the bacterium causes no noticeable problems. In others, it causes inflammation of the stomach lining and produces sores known as ulcers.

Stomach ulcers are also called gastric or peptic ulcers. The term “peptic ulcer” is the general name for an ulcer that occurs in the stomach or in the duodenum, which is the first part of the small intestine. Whatever they're called, ulcers can cause a lot of discomfort and pain.

The lining of the stomach produces hydrochloric acid and digestive enzymes. After a meal, the stomach contains an acidic, churning mass of food and enzymes. We would expect this mixture to be an inhospitable environment for bacteria, but H. pylori has some useful abilities that enable it to thrive inside the stomach.

In this illustration of the digestive tract, some of the liver is missing in order to show the gallbladder and stomach underneath.

In this illustration of the digestive tract, some of the liver is missing in order to show the gallbladder and stomach underneath.

Functions of the Stomach

When food is swallowed, it passes down the tube known as the esophagus and enters the stomach. The stomach is a J-shaped organ that is located on the left side of the upper abdomen (from the owner's point of view). It’s covered by the liver and has a volume of about one litre when it's empty. After a meal is eaten, it can expand to around four litres.

When we eat, glands in the lining of the stomach release hydrochloric acid, which makes the fluid inside the stomach acidic. This fluid is known as gastric juice and has a pH of about 2. The pH scale runs from 0 to 14, with the lower numbers indicating more acidic conditions.

Stomach glands also produce a chemical called pepsinogen. When pepsinogen enters the gastric juice, it’s converted into an enzyme called pepsin by the hydrochloric acid. The pepsin then begins the digestion of the proteins that have entered the stomach cavity (or the lumen) after a meal.

Completion of Digestion

Food generally stays in the stomach for about two to four hours. The mixture of fluid and partially digested food is known as chyme. After the stomach's job is done, chyme is gradually sent into the small intestine to complete its digestion. A muscle called the pyloric sphincter controls the passage of the chyme out of the stomach and into the duodenum.

Digestion converts food into particles that are small enough to be absorbed through the lining of the small intestine and into the bloodstream. A healthy and undamaged intestinal lining is very important. Undigested food is passed into the large intestine and eventually leaves the body through the anus as feces.

Food is moved through the esophagus, stomach, small intestine, and large intestine by a process called peristalsis. Peristalsis is a series of muscular contractions that travel in waves along the walls of the digestive tract.

H. pylori penetrating the mucus covering the stomach lining

H. pylori penetrating the mucus covering the stomach lining

A common cause of peptic ulcers, H. pylori infection may be present in more than half the people in the world. Most people don't realize they have H. pylori infection, because they never get sick from it.

— Mayo Clinic

Bacteria in the Stomach

A mucus layer covers the stomach lining to protect it from an acid attack or from an attack by pepsin. The hydrochloric acid kills most bacteria that enter the stomach, but not all of them. Stomach ulcer bacteria, for example, burrow deep into the mucus layer and move towards the stomach lining. Here they are protected from the acid.

Stomach ulcer bacteria make an enzyme called urease, which converts the urea that is present in the stomach fluid into ammonia and carbon dioxide. Ammonia is a base and helps to neutralize any acid that approaches the bacteria. It also helps to disrupt the mucus barrier covering the stomach lining, allowing the bacteria to enter the mucus.

Some other types of bacteria may be able to survive the journey through the stomach if they enter the stomach in large numbers or if they are surrounded by food that temporarily increases the pH of their environment.

The process of gastric ulceration by H. pylori

The process of gastric ulceration by H. pylori

Possible Procedures for Diagnosing a Stomach Ulcer

The production of carbon dioxide by H. pylori as it breaks down urea is the basis of the urea breath test for stomach ulcers. During the test, the patient swallows a liquid or soft solid containing "labeled" urea. The carbon in labeled urea is different from normal carbon in some way so that it can be easily detected. For example, it may have a higher atomic mass. If there are ulcer bacteria in the patient's stomach, the bacterium's urease will produce labeled carbon dioxide from the breakdown of the urea. Some of this chemical will then be sent to the lungs to be exhaled. Labeled carbon dioxide in the patient's breath strongly suggests that ulcer bacteria are present in the stomach.

Other tests that may be used to detect a stomach ulcer include the examination of a fecal sample, a blood test, an endoscopy to examine the lining of the stomach, and a biopsy (the removal of a small piece of the stomach lining for detailed observation). A CT (computerized tomography) scan may be used to detect whether an ulcer has created a hole in the stomach lining. CT scans use a specialized form of X-ray technology combined with computer processing to get a cross sectional picture of an area in the body.

Urea containing a labeled carbon atom is used in the urea breath test for the presence of a stomach ulcer.

Urea containing a labeled carbon atom is used in the urea breath test for the presence of a stomach ulcer.

How Does H. pylori Cause Gastric Ulcers?

The first step in the formation of a stomach ulcer is generally inflammation of the stomach lining, or gastritis. Many cases of gastritis are caused by the presence of H. pylori, but some are produced by the ingestion of NSAIDs (nonsteroidal anti-inflammatory drugs). Aspirin and ibuprofen are examples of NSAIDs.

Helicobacter produces chemicals that irritate and inflame the stomach lining. Researchers think that gastritis is mainly caused by the inflammatory response of the immune system as it attempts to fight the bacterial infection, however.

When gastritis is severe, the mucus lining the cavity of the stomach may be lost in one or more areas. This allows gastric juice to reach the cells of the stomach lining and damage them. The result is a sore called an ulcer.

Determination of the Bacterial Cause of Ulcers

Scientists have discovered that 80% of stomach ulcers and 90% of duodenal ulcers are caused by Helicobacter pylori. It wasn’t until 1982 that the bacterial cause of the ulcers was discovered. Before this time, ulcers were thought to arise due to stress and too much stomach acid.

Barry Marshall and Robin Warren, two Australian doctors, discovered that Helicobacter could cause ulcers. The idea that a bacterium could produce stomach ulcers was greeted by skepticism and even derision by other scientists. Barry Marshall drank a culture containing the bacterium to prove his theory. He developed a Helicobacter infection and gastritis as a result. Both doctors won a Nobel Prize for Medicine in 2005 for their discovery.

Infection Facts

Many people have been found to have Helicobacter pylori infections without experiencing any discomfort, though they may have low-grade gastritis. As the Mayo Clinic quote above says, it’s thought that more than half of the world’s population may carry the bacterium within their bodies. It seems that more people are infected in some countries than in others.

Scientists don’t know why some people develop symptoms from the bacterial infection and others don’t. They also don’t know how people become infected with Helicobacter, although they suspect that the bacterium may be obtained by eating and drinking materials contaminated by infected saliva or feces. Scientists recommend normal hygiene procedures to reduce the chance of a bacterial infection.

Washing hands frequently will help to prevent a bacterial infection.

Washing hands frequently will help to prevent a bacterial infection.

Some Possible Symptoms of a Stomach Ulcer

The main symptom of a stomach ulcer is pain, but there may also be others. Symptoms may include:

  • a dull, gnawing, or burning pain in the stomach
  • stomach pain that generally worsens after eating
  • stomach pain that disappears temporarily after taking antacids
  • bloating
  • nausea
  • vomiting
  • heartburn (a burning sensation in the chest)

Potential Complications

Untreated ulcers can lead to serious complications. The ulcers may bleed, which can cause anemia and fatigue. They may even become big enough to produce a hole in the stomach wall, allowing the contents of the stomach to enter the abdominal cavity. The stomach contents can cause inflammation of the membrane lining the abdominal cavity and covering the organs, which is known as the peritoneum. This potentially very dangerous condition is known as peritonitis. Another potential problem is that ulcers may partially or completely block the duodenal opening.

Some Common Treatments


Antibiotics prescribed by a doctor may be the first line of attack for treating a stomach ulcer. They often take two to three weeks to work. The doctor may also prescribe drugs to reduce the amount of acid that the stomach makes, since the acid irritates ulcers. The two main types of acid suppressors are H2 blockers and proton pump inhibitors.

H2 Blockers

Histamine is a chemical that stimulates the release of acid from cells in the stomach lining. The histamine must bind to receptors on the stomach cells in order to do its job. H2 blockers bind to the histamine receptors, stopping histamine from working.

Proton Pump Inhibitors or PPIs

Proton pump inhibitors are substances that reduce the process in which acid is transported from the acid-producing cells in the stomach lining into the stomach cavity. They are often the preferred acid suppressor for stomach ulcers today.

Bismuth Subsalicylate

Bismuth subsalicylate coats ulcers and helps to block them from stomach acid. It also seems to help kill Helicobacter, although it can’t replace antibiotics. Bismuth subsalicylate (such as Pepto-Bismol and other brands) can be bought in drug stores.

If you have an ulcer and want to take bismuth subsalicylate, you should seek your doctor’s opinion about the treatment. If you have unexplained gastrointestinal pain that is helped by bismuth subsalicylate but returns when the medication is stopped, you need to visit a doctor for a diagnosis and treatment.

Coffee may increase ulcer pain, although this is a controversial idea. Foods and beverages should be avoided only if a person finds that they worsen pain.

Coffee may increase ulcer pain, although this is a controversial idea. Foods and beverages should be avoided only if a person finds that they worsen pain.

Other Treatments That May Help

Medications are needed to heal a stomach ulcer, but other treatments may help to relieve pain. Eating frequent and smaller meals instead of less frequent and larger ones may be helpful. Small meals reduce the amount of acid that the stomach makes. Avoiding eating close to bedtime may also be helpful, since the food will stimulate acid production during the night. Using a different pain reliever instead of NSAIDs may be beneficial.

Other lifestyle changes may also help to relieve ulcer pain. Quitting smoking and limiting or avoiding alcohol consumption are important strategies to try. Nicotine and alcohol irritate the stomach lining and may slow the healing of an ulcer. Emotional stress doesn’t cause ulcers but may increase the pain of an existing one.

Nutritious vegetables such as broccoli are a great addition to anyone's diet, including people with a peptic ulcer.

Nutritious vegetables such as broccoli are a great addition to anyone's diet, including people with a peptic ulcer.

Diet and Pain

A bland diet used to be recommended for relieving ulcer pain. The diet contained soft foods like mashed potatoes and cream of wheat. It was also low in fat, non-acidic, and contained no spices. Milk was said to help relieve pain.

Today most doctors say that a bland diet is unnecessary and that a person suffering from a peptic ulcer should eat healthy and nutritious food like everyone else. In addition, the idea that milk helps ulcers has been discounted. It may temporarily relieve pain, but the pain soon returns. Eliminating coffee consumption (caffeinated or decaffeinated) is said to reduce pain by some people, but many researchers say that there is no evidence that this strategy is effective.

A patient should avoid ingesting certain foods only if they have found that the foods increase their ulcer pain (or if a doctor advises them to do so). Personal experience should determine which foods—if any—should be temporarily eliminated from their diet.

The Need for Further Research

Researchers are trying to learn more about how Helicobacter pylori affects the body, how it's transmitted, and how it can be eradicated. There are still a lot of unanswered questions about the bacterium and its effects, but new discoveries continue to be made. As we discover more about its behaviour and about the body’s reaction to the infection, we will hopefully develop better ways to deal with the microbe. It’s an interesting organism, but its effects can be very unpleasant.


This content is accurate and true to the best of the author’s knowledge and does not substitute for diagnosis, prognosis, treatment, prescription, and/or dietary advice from a licensed health professional. Drugs, supplements, and natural remedies may have dangerous side effects. If pregnant or nursing, consult with a qualified provider on an individual basis. Seek immediate help if you are experiencing a medical emergency.

Questions & Answers

Question: What specific antibiotics are used to treat H. pylori?

Answer: A doctor can choose from a range of antibiotics to treat an H. pylori infection. His or her choice will depend on factors such as the patient's age and other health problems, as well as the effectiveness and potential side effects of the antibiotic (or antibiotics). Different patients may be given different antibiotics.

Question: Can a teaspoon of baking soda mixed in water taken daily help the ulcer?

Answer: Since you have an ulcer, you should be under the care of a doctor. You need to ask your doctor this question. You first need to find out if the baking soda (also known as sodium bicarbonate) is likely to be helpful for you. If it is, you need to discover the appropriate dose to take. Ingesting too much sodium bicarbonate can be dangerous.

Question: Can amoxicillin be used alone to treat stomach bacteria?

Answer: Amoxicillin is an antibiotic that a doctor may choose to add to a mixture of antibiotics in order to fight a peptic ulcer. I can’t say anything beyond this, since I’m not a doctor. You should ask your physician to answer your question.

© 2010 Linda Crampton


Linda Crampton (author) from British Columbia, Canada on July 25, 2017:

Hi, Lois. Thank you very much for the comment. Your doctor might know about clinical trials in your area. He or she would be the best person to advise you about diet, too. I hope you get better soon.

lois brownlee on July 25, 2017:

I am so grateful for this article. I have this h pylori and this explaines so well why it returned. I was given amoxicillin cap teva 500 mg and clarithromyc 500 mg and it reacts very well. Are there any trial studies a person could enroll in or any diet which I could take to help? I neither smoke or use alcohol. Use aspiran occasionally. Thank you so much. Lois

Linda Crampton (author) from British Columbia, Canada on April 28, 2016:

Thank you very much, Peter. I appreciate your visit.

Peter A Edwards on April 28, 2016:

Great information and very informative. Love the images give more of an impact than just words on a page.

Linda Crampton (author) from British Columbia, Canada on June 17, 2013:

Thank you, las81071. I appreciate the comment. I know it's tempting to self-diagnose a problem when a doctor isn't helping, but I suggest that you visit a new doctor and see if he or she can help you. I'm sure that there's a doctor somewhere that can diagnose and solve your stomach problem, but it may take time to find him or her. Don't give up!

las81071 on June 17, 2013:

Thanks for the info. Very well written and easy to understand. I am always reading about stomach problems as I try to self diagnose me.

Linda Crampton (author) from British Columbia, Canada on January 23, 2012:

Thank you very much, iverson. I hope the article is helpful!

iverson on January 23, 2012:

thank you....I've been searching for days for an article like this!

Linda Crampton (author) from British Columbia, Canada on November 24, 2011:

Thank you so much for the wonderful comment, Genevieve! I appreciate it very much.

Geneviève Guillot on November 24, 2011:

The best comprehensible, and comprehensive article written about stomach ulcers.

Thank you.