Agrin is an extracellular matrix protein involved in the formation of the postsynaptic apparatus of the neuromuscular junction. In addition to spinal motor neurons, agrin is expressed by many other neuronal populations throughout the nervous system. Agrin's role outside of the neuromuscular junction, however, is poorly understood. Here we use the polymerase chain reaction to examine expression and alternative splicing of agrin in mouse somatosensory cortex during early postnatal development in vivo and in dissociated cell culture. Peak levels of agrin gene expression in developing cortex coincide with ingrowth of thalamic afferent fibres and formation of thalamocortical and intracortical synapses. Analysis of alternatively spliced agrin messenger RNA variants shows that greater than 95% of all agrin in developing and adult somatosensory cortex originates in neurons, including isoforms that have little or no activity in acetylcholine receptor aggregation assays. The levels of expression of "active" and "inactive" isoforms, however, are regulated during development. A similar pattern of agrin gene expression is also observed during a period when new synapses are being formed between somatosensory neurons growing in dissociated cell culture. Changes in agrin gene expression, observed both in vivo and in vitro, are consistent with a role for agrin in synapse formation in the central nervous system.