Sperm competition theory predicts increased spermatogenic investment with increased sperm competition risk when competition is numerical. There is ample correlational evidence for this relationship in a wide range of taxa. However, as with all correlations, this does not establish cause and effect. Nevertheless, there are no published experimental studies of the evolutionary influence of sperm competition on testis size. We report here on evolutionary responses of testis size to variation in sperm competition intensity in the yellow dung fly. Experimental flies were divided across two treatments, polyandrous or monogamous, with four replicates of each. There was a rapid evolutionary response in testis size resulting from selection via sperm competition, with larger testes found when sperm competition intensity was greatest. These results provide direct experimental evidence of evolutionary change consistent with macro-evolutionary patterns found across a wide range of taxa.