1. The central nervous system in mammals is able to react to painful stimuli at many levels that are involved in transmission, modulation and sensation of pain. Endogenous opioid peptides and their receptors are located at key points in pain pathways, and response to pain can be modulated by local application of opioids at many sites. Mechanisms of opioid analgesia at peripheral, spinal, medullary and midbrain levels are only incompletely understood; forebrain systems are even less appreciated. Local circuits in the spinal dorsal horn play a critical role in processing nociceptive afferent input and in mediating the actions of descending pain modulating systems. 2. The opioid receptors, recently cloned, exert their effects by activating G protein coupled effector systems, such as ion channels and second messenger systems. Although the receptor most commonly associated with pain relief is the mu-receptor, specific delta- and kappa-agonists can also mediate antinociception at spinal and supraspinal sites. Acute effects of opioids on target neurons are inhibitory, but excitatory effects have also been reported. 3. Noxious stimulation increases neuronal activity and modulates expression of genes, including immediate-early genes and neuropeptide (i.e. opioid) genes at spinal and supraspinal levels of the somatosensory system. Opioid drugs and endogenously released opioid peptides can modulate signal transduction mechanisms and intracellular processes that lead to alterations in protein phosphorylation and gene expression. These effects of opioids at the cellular level may underlie the mechanisms of pre-emptive analgesia and neuroplastic changes such as tolerance, dependence, sensitization, hyperalgesia, adaptation, addiction, and modulation of pain memories.