Prescription medicines to reduce stomach acid are associated with an increased risk of developing allergies, according to a study.

The research suggests people prescribed proton-pump inhibitors (PPIs) are twice as likely to be prescribed anti-allergy drugs in future years.

Scientists examined data from the health records of more than 8 million people in Austria – 97% of the population – over a four-year period.

“Previously there have been mouse studies, cellular studies and clinical observations, but this is the last brick in the whole picture,” said the study lead, Prof Erika Jensen-Jarolim, from the Medical University of Vienna.

The research, published in the journal Nature Communications, found the risks were especially heightened in women and people over 60.

Most healthy immune systems can tolerate the substances found in foods and the environment, but they can sometimes become hypersensitive, which causes allergies. Part of the initial digestion process involves stomach acid breaking down the protein molecules present in food into smaller pieces.

Patients with conditions such as gastric ulcers may be prescribed medicine to reduce the acidity in the stomach to relieve unpleasant symptoms. In this case, the normal chemical reactions involved in digestion do not work as well, meaning larger protein molecules and other potentially harmful substances are able to pass through to the intestine. This can trigger an allergic response from the immune system.

The use of acid-reducing drugs is widespread. In some cases, patients are prescribed a course covering a number of months or even years, although Jensen-Jarolim’s study shows that a potential allergic response could be brought about in patients prescribed as little as six days’ worth of acid-reducing drugs a year.

Sir Munir Pirmohamed, a professor of molecular and clinical pharmacology at the University of Liverpool, said the study had limitations.

“The authors did not have any information on the other diseases and conditions patients had, or on other drugs which were given to the patients,” he said. “Therefore, the finding of this study shows an association but does not prove causation. Further work in other databases where there are data on the patients’ other conditions is required to validate this finding.”

He added: “Despite the limitations, there is an important message here: commonly used drugs such as anti-ulcer medicines can have unforeseen adverse effects, and these drugs should only be used where there is a clinical need, and for the shortest duration possible and at the lowest dose necessary to control symptoms.”

Stephen Evans, a professor of pharmacoepidemiology at the London School of Hygiene and Tropical Medicine, agreed that other drugs may also be a factor. “PPIs are very often co-prescribed with aspirin or similar drugs known as non-steroidal anti-inflammatory drugs (NSAIDs). Aspirin and NSAIDs are among the drugs that are very well known to increase the risk of an allergic reaction,” he said.

Jensen-Jarolim hopes her study will lead to wider awareness. “Doctors are not aware of the effect, mainly because of the guidelines for anti-inflammatory treatments,” she said. “For example, most patients entering hospitals in Vienna would be prescribed this sort of medication. We have to step back from this prophylactic approach.”