To replicate in their hosts, viruses have to navigate the complexities of the mammalian cell, co-opting mechanisms of cellular physiology while defeating restriction factors that are dedicated to halting their progression. Primate lentiviruses devote a relatively large portion of their coding capacity to counteracting restriction factors by encoding accessory proteins dedicated to neutralizing the antiviral function of these intracellular inhibitors. Research into the roles of the accessory proteins has revealed the existence of previously undetected intrinsic defenses, provided insight into the evolution of primate lentiviruses as they adapt to new species and uncovered new targets for the development of therapeutics. This Review discusses the biology of the restriction factors APOBEC3, SAMHD1 and tetherin and the viral accessory proteins that counteract them.