Stops histamine at the H2 receptor in the gastric parietal cells, resulting in inhibition of gastric acid secretion.