a process is provided for producing a guanidinothiazole compound represented by the formula : ## str1 ## wherein , r 1 and r 2 , which may be the same or different , each represents a hydrogen or an alkyl group having 1 to 3 carbon atoms ; m represents 1 or 2 ; and n represents 2 , 3 or 4 . the process comprises reacting an aminothiazole compound of the formula : ## str2 ## with a cyanamide or an amidinopyrazole , the compounds are useful as intermediates in the preparation of a gastric acid secretion inhibitor .