A 45-year-old man presents with epigastric pain, nausea, and weight loss. Endoscopy reveals gastric ulcers, and a biopsy confirms the presence of Helicobacter pylori. The patient is diagnosed with a peptic ulcer disease caused by H. pylori infection. The bacterium is known to produce urease, an enzyme that neutralizes stomach acid, allowing it to colonize the gastric mucosa. Which of the following is the primary role of urease in H. pylori pathogenesis?