Understanding cooperation is a central challenge in biology, because natural selection should favor "free-loaders" that reap benefits without reciprocating. For interspecific cooperation (mutualism), most approaches to this paradox focus on costs and benefits of individual partners and the strategies mutualists use to associate with beneficial partners. However, natural selection acts on lifetime fitness, and most mutualists, particularly longer-lived species interacting with shorter-lived partners (e.g., corals and zooxanthellae, tropical trees and mycorrhizae) interact with multiple partner species throughout ontogeny. Determining how multiple partnerships might interactively affect lifetime fitness is a crucial unexplored link in understanding the evolution and maintenance of cooperation. The tropical tree Acacia drepanolobium associates with four symbiotic ant species whose short-term individual effects range from mutualistic to parasitic. Using a long-term dataset, we show that tree fitness is enhanced by partnering sequentially with sets of different ant symbionts over the ontogeny of a tree. These sets include a "sterilization parasite" that prevents reproduction and another that reduces tree survivorship. Trees associating with partner sets that include these "parasites" enhance lifetime fitness by trading off survivorship and fecundity at different life stages. Our results demonstrate the importance of evaluating mutualism within a community context and suggest that lifespan inequalities among mutualists may help cooperation persist in the face of exploitation.