Cooperative behavior seems at odds with the Darwinian principle of survival of the fittest, yet cooperation is abundant in nature. Scientists have used the Prisoner Dilemma game, in which players must choose to cooperate or defect, to study the emergence and stability of cooperation. Recent work has uncovered a remarkable class of extortion strategies that provide one player a disproportionate payoff when facing an unwitting opponent. Extortion strategies perform very well in head-to-head competitions, but they fare poorly in large, evolving populations. Rather we identify a closely related set of generous strategies, which cooperate with others and forgive defection, that replace extortionists and dominate in large populations. Our results help to explain the evolution of cooperation.