Retroviral restriction factor TRIM5alpha exhibits a high degree of sequence variation among primate species. It has been proposed that this diversity is the cumulative result of ancient, lineage-specific episodes of positive selection. Here, we describe the contribution of within-species variation to the evolution of TRIM5alpha. Sampling within two geographically distinct Old World monkey species revealed extensive polymorphism, including individual polymorphisms that predate speciation (shared polymorphism). In some instances, alleles were more closely related to orthologues of other species than to one another. Both silent and nonsynonymous changes clustered in two domains. Functional assays revealed consequences of polymorphism, including differential restriction of a small panel of retroviruses by very similar alleles. Together, these features indicate that the primate TRIM5alpha locus has evolved under balancing selection. Except for the MHC there are few, if any, examples of long-term balancing selection in primates. Our results suggest a complex evolutionary scenario, in which fixation of lineage-specific adaptations is superimposed on a subset of critical polymorphisms that predate speciation events and have been maintained by balancing selection for millions of years.