Humans are social beings; people are predisposed to join groups, categorize the social world into groups, and prefer fellow in-group members over out-group members. Social groups in turn compete for individuals and especially for the resources of individuals to maintain the cultural practices and symbolic markers of the group. We modeled the effect of this competition on population level cooperation. Using game theoretic and network science methods, we found that groups would develop and maintain norms that restrict their members to join other groups. If every group can maintain such norms against every other group (the topology of the group-network is complete), the society is composed of closed communities which do not cooperate with each...