Colonial marine invertebrates, such as sponges, corals, bryozoans, and ascidians, often live in densely populated communities where they encounter other members of their species as they grow over their substratum. Such encounters typically lead to a natural histocompatibility response in which colonies either fuse to become a single, chimeric colony or reject and aggressively compete for space. These allorecognition phenomena mediate intraspecific competition, support allotypic diversity, control the level at which selection acts, and resemble allogeneic interactions in pregnancy and transplantation. Despite the ubiquity of allorecognition in colonial phyla, however, its molecular basis has not been identified beyond what is currently known about histocompatibility in vertebrates and protochordates. We positionally cloned an allorecognition gene by using inbred strains of the cnidarian, Hydractinia symbiolongicarpus, which is a model system for the study of invertebrate allorecognition. The gene identified encodes a putative transmembrane receptor expressed in all tissues capable of allorecognition that is highly polymorphic and predicts allorecognition responses in laboratory and field-derived strains. This study reveals that a previously undescribed hypervariable molecule bearing three extracellular domains with greatest sequence similarity to the immunoglobulin superfamily is an allodeterminant in a lower metazoan.