ABSTRACT - 598933 The disclosure relates to biaryl purine and 3-deazapurine derivatives represented by of formula (I), wherein the variables are as defined in the specification. These of purine or deazapurine derivatives selectively modulate toll-like receptors (such as TLR-7) and are useful for the treatment of (inter alia) viral infections, and are also suitable for the treatment or prevention of melanoma, non-small cell lung carcinoma, hepatocellular carcinoma, basal cell carcinoma, renal cell carcinoma, myeloma, allergic rhinitis, asthma, COPD, ulcerative colitis, hepatic fibrosis, HBV, HCV, HPV, RSV, SARS, HIV, or influenza.