The pituitary develops from the interaction of the infundibulum, a region of the ventral diencephalon, and Rathke's pouch, a derivative of oral ectoderm. Postnatally, its secretory functions are controlled by hypothalamic neurons, which also derive from the ventral diencephalon. In humans, mutations affecting the X-linked transcription factor SOX3 are associated with hypopituitarism and mental retardation, but nothing is known of their etiology. We find that deletion of Sox3 in mice leads to defects of pituitary function and of specific central nervous system (CNS) midline structures. Cells in the ventral diencephalon, where Sox3 is usually highly expressed, have altered properties in mutant embryos, leading to abnormal development of Rathke's pouch, which does not express the gene. Pituitary and hypothalamic defects persist postnatally, and SOX3 may also function in a subset of hypothalamic neurons. This study shows how sensitive the pituitary is to subtle developmental defects and how one gene can act at several levels in the hypothalamic-pituitary axis.