The present invention relates to the pyrimidine compounds of formula (I),or their agriculturally acceptable salts or derivatives as herbicides, wherein the variables are defined according to the description, use of pyrimidine compounds of formula (I) as herbicide, compositions comprising them and their use as herbicides, i.e. for controlling harmful plants, and also a method for controlling unwanted vegetation which comprises allowing a herbicidal effective amount of at least one pyrimidine compounds of the formula (I) to act on plants, their seed and/or their habitat.