Mammalian cells express a variety of innate immune proteins - known as restriction factors - which defend against invading retroviruses such as HIV-1. Two members of the tripartite motif protein family - TRIM5α and TRIMCyp - were identified in 2004 as restriction factors that recognize and inactivate the capsid shell that surrounds and protects the incoming retroviral core. Research on these TRIM5 proteins has uncovered a novel mode of non-self recognition that protects against cross-species transmission of retroviruses. Our developing understanding of the mechanism of TRIM5 restriction underscores the concept that core uncoating and reverse transcription of the viral genome are coordinated processes rather than discrete steps of the post-entry pathway of retrovirus replication. In this Review, we provide an overview of the current state of knowledge of the molecular mechanism of TRIM5-mediated restriction, highlight recent advances and discuss implications for the development of capsid-targeted antiviral therapeutics.