The present invention relates to novel pyrimidine derivatives of formula (I) or pharmaceutically acceptable salts thereof which possess an excellent anti-secretory activity, pharmaceutical compositions containing the same as an active ingredient, their novel intermediates, and processes for the preparation thereof wherein: when A is piperidin-1-yl or —NH—B, wherein B is C3-C4alkyl, C3-C4alkenyl, C3-C7cycloalkyl, C1-C3alkoxyethyl, phenylethl which may be substituted or unsubstituted, 3-trifluoromethylphenylmethyl, 1-naphthylmethyl, 4-methylthiazol-2-yl or 4-phenylthiazol-2-yl, R1is hydrogen or methyl; and R2, R3, R4and R5are hydrogen; or when A is a group of formula (II); when R1is hydroxymethyl or C1-C3alkoxymethyl, R2, R3, R4, R5and R6are hydrogen; and R7is hydrogen or halogen; or when R1is hydrogen or methyl, R7is hydrogen or halogen; and one or two of R2, R3, R4, R5and R6is hydroxy, methoxy, or a group of formula (III) wherein Z is C1-C4alkyl, substituted or unsubstituted C1-C4alkenyl, cyloalkyl, benzyloxyalkyl, alkoxycarbonylalkyl, morpholinomethyl, piperidinomethyl, 4-substituted-piperazinomethyl, substituted or unsubstituted phenyl, naphthyl, substituted or unsubstituted benzyl, thiophen-2-yl-methyl, 1-substituted-pyrrolidin-2-yl or —CHR8NHR9, wherein R8is hydrogen, methyl, isopropyl, benzyl, benzyloxymethyl, methylthioethyl, benzyloxycarbonylmethyl, carbamolymethyl, carbamoylethyl, or 1-benzylimidazol-4-ylmethyl and R9is hydrogen or t-butoxycarbonyl; and the others are hydrogen or methyl.