In the title compound, C35H34N4O2S, the five-membered pyrrolidine and thiazole rings adopt envelope and twist conformations, respectively. The pyrimidine ring adopts a twist-boat conformation. The molecular structure is stabilized by C-(HO)-O-... and pi-pi intramolecular interactions, and strong N-(HN)-N-... intermolecular hydrogen bonds stabilize the packing, in addition to van der Waals interactions.