Antiretroviral drugs to prevent integration of the HIV viral genome into chromosomes are undergoing clinical trials, yet they have been developed with an imperfect understanding of their mechanism of action. The recent crystal structure of the major viral protein integrase from a related, little-known retrovirus, has finally provided insight into how the drugs work and, more importantly, how to improve them.