With numerous studies demonstrating that taking certain heartburn drugs increases several health risks, including heart attack and stroke, researchers wondered if long-term use could also increase the risk of death.

The answer to that is yes, according to a newly published study by researchers at Washington University School of Medicine in St. Louis, who concluded that longtime use of popular drugs called proton pump inhibitors over a year or two had a 50 percent higher risk of dying over the next five years than people who used another class of drugs, H2 blockers, to reduce stomach acid. H2 blockers include Zantac and Pepcid.

Proton pump inhibitors, including Prilosec, Nexium and Prevacid, work by targeting cells in the lining of the stomach that make digestive acid. The drugs signal the cells to turn off and decrease the amount of acid they make. The drugs are available for sale over-the-counter, as well as through prescriptions.

They are among the most used drugs in the world, with about 20 million patients in the United States alone. In 2015, there were about 15 million monthly prescriptions just for Nexium.

The new study says that the drugs are “often overprescribed, rarely deprescribed and frequently started inappropriately during a hospital stay, and their use extended for long-term duration without appropriate medical indication.” Data show that their use in prescription form has doubled between 2000 and 2012, although studies have estimated that up to 69 percent of proton pump inhibitor prescriptions are inappropriate.

Previous Studies Showed Risks

Over the last few years, researchers have continued to document various risks associated with the drugs, which are intended for short-term use, but often are taken over longer periods of time.

A study published in January linked the use of drugs in prescription strengths to an increase in potentially serious stomach infections. That Scottish study found that people who took proton pump inhibitors had a risk 1.7 times higher than people who took H2 blockers of an infection called C. difficile and 3.7 times the risk of coming down with an infection called Campylobacter. The infections usually cause diarrhea and pain in the abdomen, and can also lead to death.

Also in January, European researchers found that women who take PPI drugs during pregnancy have a 30 percent increased risk that their children will be born with asthma.

In December, researchers announced they discovered that using the drugs could increase the risk of ischemic stroke by 21 percent, depending on dose. With some of the drugs, the increased risk was as high as 94 percent.

A study published in November 2016 linked the drugs to a higher risk of life-threatening irregular heartbeat when taken with the antibiotic ceftriaxone.

And in August 2016, researchers linked the use of the drugs to an increased risk of loss of brain function and fluid buildup in the abdomen. Stanford researchers found in November 2015 that taking the drugs may increase the risk of heart attacks.

Other studies have found links between PPI use and side effects ranging from dementia to kidney problems.

One of the researchers on the most recent study, Ziyad Al-Aly, told his university’s website that the data were clear. “No matter how we sliced and diced the data from this large data set, we saw the same thing: There’s an increased risk of death among PPI users,” said Al-Aly, an assistant professor of medicine. “For example, when we compared patients taking H2 blockers with those taking PPIs for one to two years, we found those on PPIs had a 50 percent increased risk of dying over the next five years. People have the idea that PPIs are very safe because they are readily available, but there are real risks to taking these drugs, particularly for long periods of time.”

Veterans’ Records Examined

The study, which was published in the journal BMJ Open, involved an examination of the records from the U.S. Department of Veterans Affairs. Researchers found nearly 276,000 patients who had been prescribed a PPI and nearly 74,000 who had been prescribed H2 blockers between October 2006 and September 2008.

In looking at death rates over a five-year period, researchers calculated that for every 500 people taking a PPI for a year, there is one more death that wouldn’t have happened without the use of the drugs. That statistic could translate into thousands of deaths a year when considering the millions of people who take proton pump inhibitors, Al-Aly told the university website.

Al-Aly has also participated in research that linked PPIs to kidney disease. He and fellow researchers embarked on this study after they reasoned the health risks associated with the drugs might lead to higher death rates. Other studies have found higher risks of osteoporotic fractures and dementia.

“The adverse outcomes associated with PPI use are serious, and each is independently associated with higher risk of mortality,” the new study says. “We hypothesized that owing to the consistently observed associations between PPI use and risk of adverse health outcomes, PPI use is associated with excess risk of death, and that the risk of death would be more pronounced with increased duration of use.”

Consistent with that hypothesis, the researchers found that the risk rose steadily the longer people used PPIs. Short-term use of 30 days did not result in a significantly increased risk of death. But after a year or two, the risk was 50 percent higher for PPI users than for users of H2 blockers.

“PPIs save lives,” Al-Aly said. “If I needed a PPI, I absolutely would take it. But I wouldn’t take it willy-nilly if I didn’t need it. And I would want my doctor to be monitoring me carefully and take me off it the moment it was no longer needed.”