The plant Cannabis sativa has been used by humans for thousands of years because of its psychoactivity. The major psychoactive ingredient of cannabis is Delta(9)-tetrahydrocannabinol, which exerts effects in the brain by binding to a G-protein-coupled receptor known as the CB1 cannabinoid receptor. The discovery of this receptor indicated that endogenous cannabinoids may occur in the brain, which act as physiological ligands for CB1. Two putative endocannabinoid ligands, arachidonylethanolamide ('anandamide') and 2-arachidonylglycerol, have been identified, giving rise to the concept of a cannabinoid signalling system. Little is known about how or where these compounds are synthesized in the brain and how this relates to CB1 expression. However, detailed neuroanatomical and electrophysiological analysis of mammalian nervous systems has revealed that the CB1 receptor is targeted to the presynaptic terminals of neurons where it acts to inhibit release of 'classical' neurotransmitters. Moreover, an enzyme that inactivates endocannabinoids, fatty acid amide hydrolase, appears to be preferentially targeted to the somatodendritic compartment of neurons that are postsynaptic to CB1-expressing axon terminals. Based on these findings, we present here a model of cannabinoid signalling in which anandamide is synthesized by postsynaptic cells and acts as a retrograde messenger molecule to modulate neurotransmitter release from presynaptic terminals. Using this model as a framework, we discuss the role of cannabinoid signalling in different regions of the nervous system in relation to the characteristic physiological actions of cannabinoids in mammals, which include effects on movement, memory, pain and smooth muscle contractility. The discovery of the cannabinoid signalling system in mammals has prompted investigation of the occurrence of this pathway in non-mammalian animals. Here we review the evidence for the existence of cannabinoid receptors in non-mammalian vertebrates and invertebrates and discuss the evolution of the cannabinoid signalling system. Genes encoding orthologues of the mammalian CB1 receptor have been identified in a fish, an amphibian and a bird, indicating that CB1 receptors may occur throughout the vertebrates. Pharmacological actions of cannabinoids and specific binding sites for cannabinoids have been reported in several invertebrate species, but the molecular basis for these effects is not known. Importantly, however, the genomes of the protostomian invertebrates Drosophila melanogaster and Caenorhabditis elegans do not contain CB1 orthologues, indicating that CB1-like cannabinoid receptors may have evolved after the divergence of deuterostomes (e.g. vertebrates and echinoderms) and protostomes. Phylogenetic analysis of the relationship of vertebrate CB1 receptors with other G-protein-coupled receptors reveals that the paralogues that appear to share the most recent common evolutionary origin with CB1 are lysophospholipid receptors, melanocortin receptors and adenosine receptors. Interestingly, as with CB1, each of these receptor types does not appear to have Drosophila orthologues, indicating that this group of receptors may not occur in protostomian invertebrates. We conclude that the cannabinoid signalling system may be quite restricted in its phylogenetic distribution, probably occurring only in the deuterostomian clade of the animal kingdom and possibly only in vertebrates.