The present invention relates to novel heterocyclic compounds of the formula (I), to methods for their preparation, to compositions containing them, and to methods and use for clinical treatment of medical conditions which may benefit from immunomodulation, including rheumatoid arthritis, multiple sclerosis, diabetes, asthma, transplantation, systemic lupus erythematosis and psoriasis. More particularly the present invention relates to novel heterocyclic compounds, which are CD80 antagonists capable of inhibiting the interactions between CD80 and CD28.