When a person is infected with H. pylori the lower region of the stomach, the antrum, is predominantly inflamed. This is where most of the D cells in the stomach are. The bacteria produce a cloud of ammonia around themselves using urease to protect them from the stomach acid; however, this reacts with the acid producing ammonium which is toxic to cells. This leads to many of the D cells dying and therefore a lower level of somatostatin being secreted. This results in higher levels of gastrin and stomach acid being secreted. This, combined with the damage from ammonium, leads to ulceration of the stomach wall. 
^Liu, Y. (2005). Gastrin (G) cells and somatostatin (D) cells in patients with dyspeptic symptoms: Helicobacter pylori associated and non-associated gastritis. Journal of Clinical Pathology, 58(9), pp.927-931.