When groups compete for resources, some groups will be more successful than others, forcing out less successful groups. Group-level selection is the most extreme form of group competition, where the weaker group ceases to exist, becoming extinct. We implement group-level selection in a controlled laboratory experiment in order to study its impact on human cooperation. The experiment uses variations on the standard linear public goods game. Group-level selection operates through competition for survival: the least successful, lowest-earning groups become extinct, in the sense that they no longer are able to play the game. Additional control treatments include group comparison without extinction, and extinction of the least successful individuals across groups. We find that group-level extinction produces very high contributions to the provision of the public good, while group comparison alone or individual extinction fail to cause higher contributions. Our results provide stark evidence that group-level selection enhances within-group cooperation.