TRIM5α is a restriction factor that senses incoming retrovirus cores through an unprecedented mechanism of nonself recognition. TRIM5α assembles a hexagonal lattice that avidly binds the capsid shell, which surrounds and protects the virus core. The extent to which the TRIM lattice can cover the capsid and how TRIM5α directly contacts the capsid surface have not been established. Here, we apply cryo–electron tomography and subtomogram averaging to determine structures of TRIM5α bound to recombinant HIV-1 capsid assemblies. Our data support a mechanism of hierarchical assembly, in which a limited number of basal interaction modes are successively organized in increasingly higher-order structures that culminate in a TRIM5α cage surrounding a retroviral capsid. We further propose that cage formation explains the mechanism of restriction and provides the structural context that links capsid recognition to ubiquitin-dependent processes that disable the retrovirus. Mammalian cells express a variety of innate immune receptors that sense the presence of invading viruses and induce defensive countermeasures. TRIM5α is an E3 ubiquitin ligase that senses incoming retroviruses by binding to...