Successful collective action is usually accompanied by explicit systems for punishing noncooperators. A simple model of collective action is presented in which such punishment opportunities are available, and some individuals have a taste for exercising them. The model suggests that many of the correlates of successful collective action in the commons management literature are endogenous, and it clarifies the channels through which others operate. It points to the importance of communication costs and asymmetries in power rather than wealth in explaining when collective action fails. Heterogeneity in the ability to inflict punishment or be hurt by it may result in collective action becoming infeasible, especially when there are increasing returns in the production of the public good, but there is a range of parameters in which heterogeneity is favorable to cooperation.