The present studies have identified a series of diaminopyrimidines and diaminopyridines as novel 5-HT(7) receptor ligands. Three regiosiomeric classes of pyrimidines and four regioisomeric classes of pyridines were synthesized and analyzed for binding to the 5-HT(7) receptor. The 5-HT(7) binding affinities of different regioisomers show clearly the structure-activity relationship with position of ring nitrogens.