The human TRIM5 genes encodes a retroviral restriction factor (TRIM5α). Evolutionary analyses of this gene in mammals have revealed a complex and multifaceted scenario, suggesting that TRIM5 has been the target of exceptionally strong selective pressures, possibly exerted by recurrent waves of retroviral infections. TRIM5 displays inter-individual expression variability in humans and high levels of TRIM5 mRNA have been associated with a reduced risk of HIV-1 infection. We resequenced TRIM5 in chimpanzees and identified two polymorphisms in intron 1 that are shared with humans. Analysis of the gene region encompassing the two trans-specific variants in human populations identified exceptional nucleotide diversity levels and an excess of polymorphism compared to fixed divergence. Most tests rejected the null hypothesis of neutral evolution for this region and haplotype analysis revealed the presence of two deeply separated clades. Calculation of the time to the most recent common ancestor (TMRCA) for TRIM5 haplotypes yielded estimates ranging between 4 and 7 million years. Overall, these data indicate that long-term balancing selection, an extremely rare process outside MHC genes, has maintained trans-specific polymorphisms in the first intron of TRIM5. Bioinformatic analyses indicated that variants in intron 1 may affect transcription factor-binding sites and, therefore, TRIM5 transcriptional activity. Data herein confirm an extremely complex evolutionary history of TRIM5 genes in primates and open the possibility that regulatory variants in the gene modulate the susceptibility to HIV-1.