Parasites impose fitness costs on their hosts. Biologists therefore tend to assume that natural selection favors infection-resistant hosts. Yet, when the immune response itself is costly, theory suggests selection may instead favor loss of resistance. Immune costs are rarely documented in nature, and there are few examples of adaptive loss of resistance. Here, we show that when marine threespine stickleback colonized freshwater lakes they gained resistance to the freshwater-associated tapeworm, Schistocephalus solidus. Extensive peritoneal fibrosis and inflammation contribute to suppression of cestode growth and viability, but also impose a substantial cost of reduced fecundity. Combining genetic mapping and population genomics, we find that the immune differences between tolerant and resistant populations arise from opposing selection in both populations acting, respectively, to reduce and increase resistance consistent with divergent optimization.One Sentence SummaryRecently-evolved freshwater populations of stickleback frequently evolve increased resistance to tapeworms, involving extensive fibrosis that suppresses parasite growth; because this fibrosis greatly reduces fish fecundity, in some freshwater populations selection has favored an infection-tolerant strategy with fibrosis suppression.