Comparative studies of major histocompatibility complex (MHC) genes across vertebrate species can reveal the evolutionary processes that shape the structure and function of immune regulatory proteins.