What Bacteria Causes Ulcers? H. pylori Explained

H. pylori is the bacterium behind most ulcers, but how it survives stomach acid, spreads, and is treated is more interesting than you might expect.

A spiral-shaped bacterium called Helicobacter pylori is responsible for the majority of stomach and duodenal ulcers. Before its discovery in 1982, doctors blamed ulcers on stress and spicy food, and patients were told to manage their symptoms indefinitely. The realization that a treatable infection was the root cause ranks among the most consequential shifts in modern medicine, but the story of H. pylori goes well beyond ulcers. Roughly half the world’s population carries this organism, most without ever developing symptoms, and the bacterium’s relationship with the human body turns out to be far more complicated than “germ causes disease.”

How H. pylori Was Discovered

In 1982, two Australian researchers, Barry Marshall and Robin Warren, identified spiral bacteria in stomach biopsies from patients with gastritis and peptic ulcers. The medical establishment was skeptical. The stomach was considered too acidic for bacteria to survive, and ulcers were firmly categorized as a lifestyle disorder. To prove the link, Marshall famously drank a broth of cultured H. pylori, developed gastritis, and then cured it with antibiotics. The discovery earned Marshall and Warren the 2005 Nobel Prize in Physiology or Medicine, recognizing what the Nobel committee called one of the most impactful discoveries in medical sciences.

How a Bacterium Survives Stomach Acid

Your stomach maintains a pH low enough to break down food and kill most microbes. H. pylori gets around this with an elegant chemical trick. The bacterium produces large quantities of an enzyme called urease, which breaks down urea (a compound naturally present in gastric juice) into carbon dioxide and ammonia. The ammonia acts as a local buffer, neutralizing the acid immediately surrounding the bacterium and creating a protective cloud that lets it survive long enough to burrow into the mucus lining of the stomach wall. Once nestled in that mucus layer, the bacterium is sheltered from the full force of gastric acid and can persist for decades.

What H. pylori Does to the Stomach Lining

Survival is only step one. The actual damage comes from proteins the bacterium injects into and secretes near the cells lining the stomach. Two of the most studied are CagA and VacA. CagA is injected directly into stomach epithelial cells through a needle-like structure. Once inside, it hijacks cell-signaling pathways, causing inflammation, altering cell shape, and blocking the cell’s normal self-destruct program. VacA, meanwhile, is secreted into the surrounding environment and triggers the opposite effect: it promotes cell death and creates characteristic vacuoles inside cells.

The interplay between these two toxins is surprisingly sophisticated. Research on human gastric cells has shown that CagA actually counteracts VacA’s cell-killing effects through two complementary mechanisms, depending on how host enzymes modify the CagA protein after injection. In one mode, CagA prevents VacA from reaching the cellular compartments it needs to trigger cell death. In the other, CagA blocks the cell-death cascade at the mitochondrial level. The net result: cells survive but in an altered, chronically inflamed state. Over years or decades, this sustained inflammation erodes the protective mucus layer, leaving the underlying tissue vulnerable to acid. That is how an ulcer forms.

How You Catch It

H. pylori infection is overwhelmingly acquired in childhood, usually before age five, and people who become infected tend to carry the bacterium for life unless treated. The exact transmission route is still debated, but person-to-person spread within families appears to be the dominant pathway. A German birth cohort study found that by age four, about 3% of children were infected, and after adjusting for other household members, having an infected mother was the single strongest risk factor, increasing a child’s odds roughly thirteenfold.

Vomiting by an infected household member appears to be a particularly effective transmission event. A study following over 1,700 initially uninfected people in households found that exposure to an H. pylori-positive person who experienced gastroenteritis with vomiting raised the risk of new infection about sixfold. Children under two were especially vulnerable, with an annualized infection rate around 21%, compared with roughly 3% in adults. Environmental contamination through contaminated water likely plays a role too, particularly in developing regions, where infection prevalence exceeds 80%, compared with under 40% in higher-income urban areas.

Most Infected People Never Get Ulcers

This is one of the most counterintuitive facts about H. pylori: while roughly half the global population carries the bacterium, only about 30% of infected individuals develop any upper gastrointestinal disease, ranging from mild gastritis to peptic ulcers to, in rarer cases, gastric cancer or lymphoma. The remaining 70% carry the bacterium for life without noticeable symptoms. What determines who gets sick and who does not comes down to a combination of bacterial strain differences (not all H. pylori strains carry aggressive CagA variants), the individual’s genetic susceptibility, diet, and environmental factors like smoking. The science here remains incomplete, which is part of why blanket screening and treating all carriers is not universally recommended.

How H. pylori Is Diagnosed

If your doctor suspects an H. pylori infection, several tests can confirm it, and they fall into two broad categories: those that require an endoscopy and those that do not.

Among non-invasive tests, the urea breath test and the stool antigen test are the workhorses. The breath test exploits the same urease trick the bacterium uses to survive: you swallow a special urea compound, and if H. pylori is present, its urease breaks the compound down into carbon dioxide that can be measured in your exhaled breath. The stool antigen test detects H. pylori proteins directly in a stool sample. A comparison of diagnostic methods found the stool antigen test to be the most accurate non-invasive option, with sensitivity around 96% and specificity in the 83–97% range across different study populations. Blood antibody tests, on the other hand, perform poorly: sensitivity and specificity in some studies hovered around 50–73%, barely better than a coin flip for ruling infection in or out. Antibody tests also cannot distinguish a current infection from a past one, since antibodies can linger for months after the bacterium is gone.

When an endoscopy is performed for other reasons, such as investigating alarm symptoms like bleeding or unexplained weight loss, biopsies can be taken for a rapid urease test or examined under a microscope. One limitation of biopsy-based diagnosis is that H. pylori is not evenly distributed across the stomach, so random biopsies can miss the infection. Targeted sampling from specific stomach sites improves reliability.

Treatment and the Antibiotic Resistance Problem

Treating H. pylori means killing the bacterium with a combination of antibiotics plus an acid-suppressing drug (a proton pump inhibitor, or PPI). The traditional first-line approach has been “triple therapy”: a PPI with two antibiotics, most commonly clarithromycin and amoxicillin, for 14 days. In areas where antibiotic resistance is high, guidelines increasingly favor “quadruple therapy,” which adds bismuth to the mix along with different antibiotics like metronidazole and tetracycline. Data from a large European registry shows that several 14-day regimens and most 10-day quadruple regimens using high-dose PPIs achieve eradication rates of 90% or above.

The catch is antibiotic resistance, and it is growing. In a large study of clinical trial patients across the U.S. and Europe, about 22% of H. pylori isolates were resistant to clarithromycin, the backbone antibiotic in triple therapy. Metronidazole resistance was even higher, at roughly 69%. Amoxicillin resistance remained rare at about 1%. Other U.S. data found clarithromycin resistance as high as 32%, with treatment failure nearly three times more likely in resistant cases. The practical takeaway is that clarithromycin-based triple therapy, once the go-to option, is no longer reliable in many regions. If your first course of treatment fails, your doctor will likely switch to a bismuth-containing regimen or a different antibiotic combination. In some cases, culture-based susceptibility testing is used to choose the right drugs, though this requires an endoscopy.

When H. pylori Is Not the Cause

Not all ulcers are caused by H. pylori. The second most common culprit is long-term use of nonsteroidal anti-inflammatory drugs, such as ibuprofen, naproxen, or aspirin. These medications inhibit the enzymes that maintain the stomach’s protective mucus layer, leaving it vulnerable to acid damage regardless of whether H. pylori is present. A study of patients on continuous NSAID therapy found that the acid-suppressing drug omeprazole prevented ulcers independently of the patient’s H. pylori status, confirming that the two risk factors operate through different mechanisms. In rare cases, ulcers arise from conditions that cause massive acid overproduction, such as Zollinger-Ellison syndrome, or from other infections in immunocompromised individuals. But for the vast majority of people with a peptic ulcer, the cause is either H. pylori or NSAIDs, and sometimes both together.

The Cancer Connection

H. pylori was classified as a definite (Group 1) carcinogen by the World Health Organization’s cancer research arm back in 1994. The link is clearest for gastric adenocarcinoma, the most common type of stomach cancer. Decades of chronic inflammation driven by the bacterium can progress through a sequence from gastritis to atrophy to precancerous changes and eventually cancer. Strains carrying CagA are particularly dangerous: the CagA protein, once inside host cells, activates a signaling molecule called SHP2 that promotes uncontrolled cell growth.

H. pylori is also linked to a rare form of stomach lymphoma called MALT lymphoma (mucosa-associated lymphoid tissue lymphoma). The bacterium indirectly drives the growth of this cancer through chronic immune stimulation, and the CagA protein may play a direct role by inhibiting cell death in B lymphocytes. In early-stage MALT lymphoma, simply eradicating H. pylori with antibiotics can put the lymphoma into remission, which is a remarkable outcome for a cancer treatment.

What Happens After You Kill the Bacterium

Curing H. pylori is clearly beneficial for anyone with an active ulcer or early MALT lymphoma, but the consequences of eradication are not entirely one-sided. One area of ongoing debate is what happens to ghrelin, the so-called “hunger hormone,” after H. pylori is cleared. An early and influential study in asymptomatic carriers found that plasma ghrelin rose by about 75% after successful eradication, along with a 14% increase in stomach acidity. The authors speculated this could promote appetite, weight gain, and potentially acid reflux. However, subsequent studies have not consistently reproduced this finding. One investigation measuring ghrelin levels in both stomach tissue and blood found no significant change after eradication. Another study concluded that H. pylori infection was neither protective nor harmful for acid reflux and that gastrin, ghrelin, and motilin levels were not meaningfully affected by eradication. The practical message: if you have an indication for eradication, the metabolic effects are uncertain and should not be a reason to avoid treatment.

Other Helicobacter Species

H. pylori dominates the conversation, but it is not the only Helicobacter species that can colonize the human stomach. At least five other species, formerly lumped under the catch-all name “H. heilmannii,” have been found in human gastric biopsies. These include H. suis (normally found in pigs), H. felis and H. bizzozeronii (found in dogs and cats), and others. H. suis is the most common non-pylori species in humans. These infections are thought to originate from direct contact with animals, and they have been linked to gastritis, ulcers, and even MALT lymphoma, though all occur far less frequently than H. pylori-associated disease. These organisms are extremely difficult to grow in the lab, which means they are likely underdiagnosed. If someone with pet exposure develops gastritis but tests negative for H. pylori, a non-pylori Helicobacter infection is worth considering.

H. pylori and the Gastric Microbiome

The stomach was long considered nearly sterile, but modern sequencing has revealed a resident microbial community. When H. pylori is present, it dominates this ecosystem and reduces the diversity of other bacterial species. In infected individuals, the predominant bacterial groups in the stomach shift toward specific types including Firmicutes, Proteobacteria, and Actinobacteria, a pattern described as gastric dysbiosis. What this means clinically is still being worked out. Some researchers suspect that the altered microbial community may contribute to disease progression or influence how well antibiotic therapy works. Patients with refractory infections that resist multiple courses of treatment tend to have particular microbial profiles, though cause and effect are hard to tease apart.

An Ancient Traveling Companion

H. pylori is not a recent invader. Genetic analysis suggests the bacterium has been co-evolving with humans for at least 88,000 to 116,000 years, with some estimates placing the association even further back. When modern humans migrated out of Africa roughly 60,000 years ago, H. pylori came along. Over millennia of geographic isolation, both human and bacterial populations diverged in parallel, producing at least seven major genetic populations of H. pylori with distinct geographic distributions. Present-day bacterial isolates carry molecular markers that mirror human migration patterns so closely that H. pylori strains have been used to trace ancient population movements. This deep co-evolutionary history has led some researchers to question whether H. pylori is purely a pathogen or whether it played some beneficial role in our ancestors that is only now being studied.

Why There Is No Vaccine Yet

Given that H. pylori infects billions of people and antibiotic resistance is climbing, a vaccine would be transformative. Yet despite decades of effort, none has made it to market. The main challenge is no longer figuring out which bacterial proteins to target. Researchers have identified numerous promising antigens. The bottleneck is getting the vaccine to produce a strong, lasting immune response at the right location: the stomach lining itself. H. pylori has evolved sophisticated immune-evasion strategies over its long coexistence with humans, which means traditional vaccine approaches have repeatedly succeeded in animal models but failed to translate into clinical protection in humans.

Newer approaches are generating cautious optimism. mRNA vaccine platforms, which proved their worth during the COVID-19 pandemic, offer enhanced immunogenicity that could help overcome the bacterium’s defenses. Novel mucosal adjuvants and delivery systems are being designed specifically to boost immune responses at the gut lining rather than systemically. Standardized animal models are also improving the ability to predict which candidates will work in humans. Still, a commercially available vaccine remains years away at best, and antibiotic-based eradication will stay the mainstay of treatment for the foreseeable future.