Abstract Ketamine is a dissociative anesthetic with complex actions on the CNS. We investigated here the effects of ketamine anesthesia on somatosensory processing in the rat spinal cord, thalamus, and cerebral cortex, using the quantitative 2-deoxyglucose mapping technique. Unanesthetized or ketamine-anesthetized male Sprague–Dawley rats received a s.c. injection of a dilute formaldehyde solution (5%, 0.08 ml) into a forepaw, inducing prolonged noxious afferent input, or an equal volume of isotonic saline as a control stimulus. The 2-deoxyglucose experiments started 30 min after the injection. In the cervical enlargement of the spinal cord, ketamine had no significant effect on glucose metabolic rates in saline-injected animals, whereas it prevented the metabolic increases elicited by prolonged noxious stimulation in unanesthetized animals. At the thalamic level, ketamine increased glucose uptake in both saline- and formalin-injected rats in the lateral posterior, lateral dorsal, medial dorsal, gelatinosus, antero-ventral and antero-medial thalamic nuclei, whereas it decreased metabolic activity in the ventro-basal complex. At the cortical level, the drug increased metabolic activity in both control and formalin groups in the lacunosus-molecularis layer of the dorsal hippocampus, posterior parietal, retrosplenial, cingulate and frontal cortex; significant metabolic decreases were found in the CA1 region of the dorsal hippocampus and in the parietal 1 and 2 cortical areas. In the investigated brain regions, ketamine did not abolish noxious-evoked increases in glucose uptake, which were in fact enhanced in the forelimb cortex and in the lacunosus-molecularis layer of the hippocampus. The dissociation between the spinal and supraspinal effects of ketamine suggests a specific antinociceptive action on spinal circuits, in parallel with complex changes of the activity of brain circuits involved in somatosensory processing. More generally, this study shows that functional imaging techniques are able to quantitatively assess the effects of anesthetic drugs on nociceptive processing at different levels of the neuraxis.