A series of 2-guanidino-4-heteroarylthiazoles, wherein the heteroaryl substituent is selected from thiazolyl, triazolyl, imidazolyl, and 2-alkyl, 2-amino and 2-carboxamido derivatives thereof, are disclosed. The novel compounds have activity as antisecretory agents and histamine H.sub.2 antagonists and are useful for the treatment of gastric hyperacidity and peptic ulcers. Also disclosed are pharmaceutical compositions containing the novel compounds of this invention and a method of using the compounds in the treatment of gastric hyperacidity and peptic ulcers. Novel intermediates useful in the preparation of the novel antisecretory compounds are also described.