This work reports on the synthesis and affinities for the 5-HT(3) versus the 5-HT(4) receptor of new piperazinyl-substituted thienopyrimidine derivatives 20-45 with a view to identify potent and selective ligands for the 5-HT(3) receptor. Some of the new compounds show good affinity for the 5-HT(3) receptor and, notably, do not display any affinity for the 5-HT(4) receptor. 4-(4-Methyl-1-piperazinyl)-2-methylthio-6,7-dihydro-5H-cyclopenta[4,5]thieno[2,3-d]pyrimidine 31 exhibits the highest affinity for the 5-HT(3) receptor (Ki = 33 nM) and behaves as noncompetitive antagonist.