The present invention provides a pyrimidine derivative represented by the formula: wherein R<1p >and R<1q >are the same or different, and each represents (1) hydrogen, (2) halogen, (3) a C1-6alkyl group which may be substituted or (4) a C1-6alkoxy group, and so on, R<2 >is halogen, a C1-6alkyl group, cyano group, and so on, Ar is a phenyl group which may be substituted or is a condensed hetero ring which may be substituted, which has excellent selective herbicidal activity, and a herbicide containing the derivative.