Instead of doing an endoscopy, which involves passing a tiny telescope down the throat to get a view of the stomach, researchers in Scotland asked patients to blow into a tube to detect any signs of Helicobacter pylori, a common bacterium.
"The breath test was as effective and as safe as an endoscopy and cheaper and preferred by the patients," Dr. Ken McColl, of the Western Infirmary in Glasgow, said in an interview.
In one of the first studies directly to compare both methods, McColl and his team chose 708 patients suffering from indigestion to receive either both tests or just the breath analysis.
The breath test alone was as good as endoscopy. Patients also found it just as assuring.
McColl, whose research is reported in The British Medical Journal, believes the breath test may even help to reduce the incidence of stomach cancer.
"Because we are treating the infection in all these patients, we are removing a factor which is recognized to be important in the long term in stomach cancer," he explained.
People may be more willing to have a breath test than an endoscopy so it could improve the detection rate of H. pylori infections.
Doctors usually perform an endoscopy to detect ulcers. If people do not have the bacterial infection in their stomach they can be reassured they do not have ulcers. If they do, doctors will treat the infection, which also cures the ulcer.
H. pylori weakens the protective coating of the stomach and allows acid to get through the sensitive lining beneath. Both the acid and the bacteria irritate the lining and cause a sore, or ulcer.
Scientists do not know why it causes ulcers in some people and not others.
Previously the breath test was used after the patient had had an endoscopy and treatment to make sure the infection was gone.
"We're suggesting that in a good proportion of patients with stomach aches this test, or any other non-invasive H. pylori test, can replace endoscopy," he added.