Stomach acid helps the body absorb the vitamin, and suppressing the acid can lead to B12 deficiency, which is known to increase the risk of dementia, anaemia and nerve damage.
Researchers studied health records, including diagnoses, pharmacy orders, and laboratory results, of 25,956 adult Kaiser Permanente patients in Northern California diagnosed with vitamin B12 deficiency between January 1997 and June 2011, and compared them to 184,199 patients without the deficiency over the same period.
Their findings, published in the Journal of the American Medical Association, show that those who took anti-acid medications known as proton pump inhibitors (PPIs) for at least two years had significantly higher risk of B12 deficiency.
In 2012, about 15 million people received 157 million prescriptions for PPIs.
Another kind of anti-acid medication known as histamine-2-receptor agonists (H2RAs) are also widely prescribed, but varieties of both PPIs and H2RAs are commonly available over the counter without a prescription.
Among the 25,956 patients who had the deficiency, 12 percent used PPIs for at least 2 years, compared with 7.2 percent of patients who did not have the deficiency. The difference was smaller among those who took H2RAs, with 4.2 percent of patients with B12 deficiency using these medications versus 3.2 percent of control patients.
"Patients who took PPI medications for more than two years had a 65 percent increase in their risk of B12 deficiency," said Douglas A. Corley, research scientist with Kaiser Permanente. "Higher doses also were associated with an increased risk, compared with lower doses."