A series of arecoline bioisosteres, where the ester group is replaced by a 1,2,3-triazole-4-yl or a tetrazole-5-yl group, was synthesized and evaluated in vitro for affinity and efficacy at muscarinic receptors and in vivo for cholinergic side effects. The corresponding piperidine derivatives were also studied. In the 1,2,3,6-tetrahydropyridyl-1,2,3-triazole series, only derivatives with 2-substituents in the 1,2,3-triazole ring exert muscarinic agonist activity. The same trend is seen in the corresponding tetrazole series, where only 2-substituted derivatives display muscarinic agonist activity. The methyl derivatives in both series are full agonists, whereas the derivatives with longer side chains are partial agonists. Introduction of methyl substituents in the 1,2,3,6-tetrahydropyridine ring generally lowers affinity considerably except for the 3-substituted derivatives, where some activity is retained. In both the 1,2,3-triazole and tetrazole series, derivatives without substituents at the basic nitrogen in the 1,2,3,6-tetrahydropyridine ring are unselective full agonists, whereas the methyl-substituted derivatives generally are more M1 selective compared to M2. Larger substituents than methyl abolish activity. The 4-(3-piperidyl)-1,2,3-triazole and 5-(3-piperidyl)-2H-tetrazole derivatives are generally less active than the corresponding 1,2,3,6-tetrahydropyridine derivatives, and only the 2-allyl- and 2-propargyl-1,2,3-triazole derivatives display activities comparable to the most active compounds in the 1,2,3,6-tetrahydropyridine series. The propargyl derivative is an unselective full agonist, and resolution did not reveal any stereoselectivity The allyl derivative is a partial agonist with some selectivity for the M1 receptor, and testing of the enantiomers showed that the (+)-enantiomer is an unselective partial agonist, whereas the (-)-enantiomer is a partial agonist with preference for the M1 receptor. Generally, the structure-activity relationships of the 1,2,3-triazole and tetrazole series are very similar, and two compounds, 2-ethyl-4-(1-methyl-1,2,3,6-tetrahydro-5-pyridyl)-1,2,3-triazole and 2-ethyl-5-(1-methyl-1,2,3,6-tetrahydro-5-pyridyl)-2H-tetrazole, are M1 agonists/M2 antagonists. Muscarinic compounds with this profile are of particular interest as drugs for the treatment of Alzheimer's disease.