Although discriminating self from nonself is a cardinal animal trait, metazoan allorecognition genes do not appear to be homologous. Here, we characterize the Aggregation Factor (AF) gene family, which encodes putative allorecognition factors in the demosponge Amphimedon queenslandica, and trace its evolution across 24 sponge (Porifera) species. The AF locus in Amphimedon is comprised of a cluster of five similar genes that encode Calx-beta and Von Willebrand domains and a newly defined Wreath domain, and are highly polymorphic. Further AF variance appears to be generated through individualistic patterns of RNA editing. The AF gene family varies between poriferans, with protein sequences and domains diagnostic of the AF family being present in Amphimedon and other demosponges, but absent from other sponge classes. Within the demosponges, AFs vary widely with no two species having the same AF repertoire or domain organization. The evolution of AFs suggests that their diversification occurs via high allelism, and the continual and rapid gain, loss and shuffling of domains over evolutionary time. Given the marked differences in metazoan allorecognition genes, we propose the rapid evolution of AFs in sponges provides a model for understanding the extensive diversification of self-nonself recognition systems in the animal kingdom.