Rhesus macaques experience variable levels of stress on the basis of their position in the social hierarchy. To examine how stress affects immune function, Snyder-Mackler et al. manipulated the social status of individual macaques (see the Perspective by Sapolsky). Social status influenced the immune system at multiple levels, from immune cell numbers to gene expression, and altered signaling pathways in a model of response to infection. Macaques possess a plastic and adaptive immune response wherein social subordination promotes antibacterial responses, whereas high social status promotes antiviral responses.