Adaptive immunity is unique to the vertebrates, and the molecules involved (including immunoglobulins, T cell receptors and the major histocompatibility complex molecules) seem to have diversified very rapidly early in vertebrate history. Reconstruction of gene phylogenies has yielded insights into the evolutionary origin of a number of molecular systems, including the complement system and the major histocompatibility complex (MHC). These analyses have indicated that the C5 component of complement arose by gene duplication prior to the divergence of C3 and C4, which suggests that the alternative complement pathway was the first to evolve. In the case of the MHC, phylogenetic analysis supports the hypothesis that MHC class II molecules evolved before class I molecules. The fact that the MHC-linked proteasome components that specifically produce peptides for presentation by class I MHC appear to have originated before the separation of jawed and jawless vertebrates suggests that the MHC itself may have been present at this time. Immune system gene families have evolved by gene duplication, interlocus recombination and (in some cases) positive Darwinian selection favoring diversity at the amino acid level.