"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 study senior author Doctor Ziyad Al-Aly, an assistant professor of medicine at Washington University School of Medicine in the United States.
"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.
"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."
Both PPIs and H2 blockers are prescribed for serious medical conditions such as upper gastrointestinal tract bleeding, gastroesophageal reflux disease and esophageal cancer.
Over-the-counter PPIs are most often used for heartburn and indigestion.
The researchers found a 25 per cent increased risk of death in the PPI group compared with the H2 blocker group.
They calculated that, for every 500 people taking PPIs for a year, there is one extra death that would not have otherwise occurred.