Carnitine prevents acute ammonia toxicity in animals. We propose that acute ammonia toxicity is mediated by activation of N-methyl-D-aspartate receptors and have shown that carnitine prevents glutamate neurotoxicity. The aim of this work was to assess whether other compounds containing a trimethylamine group are able to prevent ammonia toxicity in mice and/or glutamate toxicity in primary neuronal cultures. It is shown that betaine, trimethylamine-N-oxide, choline, acetylcholine, carbachol and acetylcarnitine prevent ammonia toxicity in mice. They also prevent glutamate but not N-methyl-D-aspartate neurotoxicity. Choline, acetylcholine and acetylcarnitine afford partial (approximately 50%) protection at nanomolar concentrations and nearly complete protection at micromolar concentrations. Trimethylamine-N-oxide, carbachol and betaine afford nearly complete protection at approximately 0.2 mM. The protective effect against glutamate neurotoxicity is prevented by 2-amino-3-phosphonopropionic acid, an antagonist of metabotropic glutamate receptors. Atropine, an antagonist of muscarinic receptors, prevents the protective effect of most of the above compounds against ammonia toxicity in mice and against glutamate toxicity in cultured neurons. These results support the idea that acute ammonia toxicity is mediated by activation of N-methyl-D-aspartate receptors and that glutamate neurotoxicity could be prevented by activating metabotropic glutamate receptors and/or muscarinic receptors.