Researchers have found that voting can help increase voluntary contributions to a public good—provided enforcement through a third party. Not all collective agreements, however, guarantee third-party enforcement. We design an experiment to explore whether a voting rule with and without endogenous punishment increases contributions to a public good. Our results suggest that voting by itself does not increase cooperation, but if voters can punish violators, contributions increase significantly. While costly punishment increases contributions at the price of lower efficiency, overall efficiency for a voting-with-punishment rule still exceeds the level observed for a voting-without-punishment rule. (JEL C92, D72, H41)