The asymmetric unit of the title compound, C23H23N5OS, contains two independent molecules. In one molecule, the thiazole and pyrimidine rings are almost co-planar, making a dihedral angle of 2.48 (8)°. In the other molecule, the corresponding dihedral angle is 12.82 (8)°. The crystal structure is stabilized by weak intermolecular N—H⋯N and C—H⋯O interactions that extend along the b axis