Simian immunodeficiency viruses of sooty mangabeys (SIVsm) are the source of multiple, successful cross-species transmissions, having given rise to HIV-2 in humans, SIVmac in rhesus macaques, and SIVstm in stump-tailed macaques. Cellular assays and phylogenetic comparisons indirectly support a role for TRIM5alpha, the product of the TRIM5 gene, in suppressing interspecies transmission and emergence of retroviruses in nature. Here, we investigate the in vivo role of TRIM5 directly, focusing on transmission of primate immunodeficiency viruses between outbred primate hosts. Specifically, we retrospectively analyzed experimental cross-species transmission of SIVsm in two cohorts of rhesus macaques and found a significant effect of TRIM5 genotype on viral replication levels. The effect was especially pronounced in a cohort of animals infected with SIVsmE543-3, where TRIM5 genotype correlated with approximately 100-fold to 1,000-fold differences in viral replication levels. Surprisingly, transmission occurred even in individuals bearing restrictive TRIM5 genotypes, resulting in attenuation of replication rather than an outright block to infection. In cell-culture assays, the same TRIM5 alleles associated with viral suppression in vivo blocked infectivity of two SIVsm strains, but not the macaque-adapted strain SIVmac239. Adaptations appeared in the viral capsid in animals with restrictive TRIM5 genotypes, and similar adaptations coincide with emergence of SIVmac in captive macaques in the 1970s. Thus, host TRIM5 can suppress viral replication in vivo, exerting selective pressure during the initial stages of cross-species transmission.