Histocompatibility--the ability of an organism to distinguish its own cells and tissue from those of another--is a universal phenomenon in the Metazoa. In vertebrates, histocompatibility is a function of the immune system controlled by a highly polymorphic major histocompatibility complex (MHC), which encodes proteins that target foreign molecules for immune cell recognition. The association of the MHC and immune function suggests an evolutionary relationship between metazoan histocompatibility and the origins of vertebrate immunity. However, the MHC of vertebrates is the only functionally characterized histocompatibility system; the mechanisms underlying this process in non-vertebrates are unknown. A primitive chordate, the ascidian Botryllus schlosseri, also undergoes a histocompatibility reaction controlled by a highly polymorphic locus. Here we describe the isolation of a candidate gene encoding an immunoglobulin superfamily member that, by itself, predicts the outcome of histocompatibility reactions. This is the first non-vertebrate histocompatibility gene described, and may provide insights into the evolution of vertebrate adaptive immunity.