One of the great challenges in biology is to understand how particular complex morphological and physiological characters originated in specific evolutionary lineages. In this article, we address the origin of the vertebrate hypothalamic-pituitary-peripheral gland (H-P-PG) endocrine system, a complex network of specialized tissues, ligands and receptors. Analysis of metazoan nucleotide and protein sequences reveals a patchwork pattern of H-P-PG gene conservation between vertebrates and closely related invertebrates (ascidians). This is consistent with a model of how the vertebrate H-P-PG endocrine system could have emerged in relatively few steps by gene family expansion and by regulatory and structural modifications to genes that are present in a chordate ancestor. Some of these changes might have resulted in new connections between metabolic or signaling pathways, such as the bridging of 'synthesis islands' to form an efficient system for steroid hormone synthesis.