The invention relates to 4,6-diaminoquinazoline derivatives of formula IIIA which are modulators of the Cot (cancer Osaka thyroid) kinase, also known as MAP3K8, EST or Tlp-2, and their use for treating e.g. cancer, diabetes and inflammatory diseases.