Pyridine and pyrimidine derivatives inhibit ubiquitination of human polypeptides, particularly of POSH and POSH-associated proteins such as HERPUD1, and can be used as medicaments for treatment of viral infections caused by virus such as HIV and for treatment of neurological disorders or diseases.