A compound of formula, or a salt thereof, wherein: X 1 is N or CR 1; R 1 is selected from the group consisting of hydrogen, halogen, cyano, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 alkoxy, -C OC 1 -C 6 alkyl, - S p C 1 -C 6 alkyl, NR 6 R 7, C 1 -C 6 haloalkoxy and C 1 -C 6 haloalkyl; R 2 is selected from the group consisting of halogen, cyano, nitro, C 1 -C 6 alkyl, C 1 -C 6 haloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, trimethylsilylC 2 -C 6 alkynyl-, C 3 -C 6 cycloalkyl, C 5 -C 6 cycloalkenyl, -C OC 1 -C 6 alkyl, -S p (C 1 -C 6 alkyl), C 1 -C 6 alkoxy,C 1 -C 6 haloalkoxy, -O-(CR a R b) q R 10, or phenyl; R 3 is -C R 9; R 4 is selected from the group consisting of hydrogen, C 1 -C 6 alkyl, C 1 -C 6 haloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C r alkoxyC s alkyl, - C r alkoxyC s haloalkyl, C r alkoxyC s thioalkyl, -C R 9 and -(CR a R b) q R 5; each R a is independently hydrogen or C 1 -C 2 alkyl; each R b is independently hydrogen or C 1 -C 2 alkyl; R 5 is -C OC 1 -C 6 alkyl, -C 3 -C 6 cycloalkyl, cyano, -NR 6 R 7, -C NR a R b, - S p (R 11) n, -aryl or-heteroaryl wherein said aryl and heteroaryl are optionally substituted by 1 to 3 independent R 8; R 6 and R 7 are independently selected from the group consisting of hydrogen, C 1 -C 6 alkyl and ―C OC 1 -C 6 alkyl; each R 8 is independently selected from the group consisting of halogen, C 1 -C 6 alkyl and C 1 -C 6 alkoxy-, C 1 -C 6 haloalkyl, C 1 -C 6 haloalkoxy-, cyano and S p (C 1 -C 6 alkyl); each R 9 is independently selected from the group consisting of hydrogen, C 1 -C 6 alkyl, C r alkoxyC s alkyl, C 1 -C 6 haloalkyl, C r alkoxyC s haloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, and -(CR a R b) q R 10; or R 4 and R 9 together with the atoms to which they are joined form a 5-7 membered ring system containing from 1 to 3 heteroatoms, wherein at least one heteratom is N, and any additional heteroatom is independently selected from S in the form of S p, O and N; each R 10 is independently -C OR c, -OC R c, -C 3 -C 6 cycloalkyl, or an ―aryl, - aryloxy, -heteroaryl, -heteroaryloxy or -heterocyclyl ring, wherein said ring is optionally substituted by 1 to 3 independent R 8; R c is hydrogen or C 1 -C 4 alkyl; each n is independently 0 or 1; p is 0, 1, or 2; each q is independently 0, 1, 2, 3, 4, 5 or 6; r is 1, 2, 3, 4, or 5, s is 1, 2, 3, 4, or 5, and the sum of r+s is less than or equal to 6; and R 11 is C 1 -C 6 alkyl. X 1 is N or CR 1; R 1 is selected from the group consisting of hydrogen, halogen, cyano, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 alkoxy, -C OC 1 -C 6 alkyl, - S p C 1 -C 6 alkyl, NR 6 R 7, C 1 -C 6 haloalkoxy and C 1 -C 6 haloalkyl; R 2 is selected from the group consisting of halogen, cyano, nitro, C 1 -C 6 alkyl, C 1 -C 6 haloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, trimethylsilylC 2 -C 6 alkynyl-, C 3 -C 6 cycloalkyl, C 5 -C 6 cycloalkenyl, -C OC 1 -C 6 alkyl, -S p (C 1 -C 6 alkyl), C 1 -C 6 alkoxy,C 1 -C 6 haloalkoxy, -O-(CR a R b) q R 10, or phenyl; R 3 is -C R 9; R 4 is selected from the group consisting of hydrogen, C 1 -C 6 alkyl, C 1 -C 6 haloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C r alkoxyC s alkyl, - C r alkoxyC s haloalkyl, C r alkoxyC s thioalkyl, -C R 9 and -(CR a R b) q R 5; each R a is independently hydrogen or C 1 -C 2 alkyl; each R b is independently hydrogen or C 1 -C 2 alkyl; R 5 is -C OC 1 -C 6 alkyl, -C 3 -C 6 cycloalkyl, cyano, -NR 6 R 7, -C NR a R b, - S p (R 11) n, -aryl or-heteroaryl wherein said aryl and heteroaryl are optionally substituted by 1 to 3 independent R 8; R 6 and R 7 are independently selected from the group consisting of hydrogen, C 1 -C 6 alkyl and ―C OC 1 -C 6 alkyl; each R 8 is independently selected from the group consisting of halogen, C 1 -C 6 alkyl and C 1 -C 6 alkoxy-, C 1 -C 6 haloalkyl, C 1 -C 6 haloalkoxy-, cyano and S p (C 1 -C 6 alkyl); each R 9 is independently selected from the group consisting of hydrogen, C 1 -C 6 alkyl, C r alkoxyC s alkyl, C 1 -C 6 haloalkyl, C r alkoxyC s haloalkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, and -(CR a R b) q R 10; or R 4 and R 9 together with the atoms to which they are joined form a 5-7 membered ring system containing from 1 to 3 heteroatoms, wherein at least one heteratom is N, and any additional heteroatom is independently selected from S in the form of S p, O and N; each R 10 is independently -C OR c, -OC R c, -C 3 -C 6 cycloalkyl, or an ―aryl, - aryloxy, -heteroaryl, -heteroaryloxy or -heterocyclyl ring, wherein said ring is optionally substituted by 1 to 3 independent R 8; R c is hydrogen or C 1 -C 4 alkyl; each n is independently 0 or 1; p is 0, 1, or 2; each q is independently 0, 1, 2, 3, 4, 5 or 6; r is 1, 2, 3, 4, or 5, s is 1, 2, 3, 4, or 5, and the sum of r+s is less than or equal to 6; and R 11 is C 1 -C 6 alkyl.