In small groups norm enforcement is provided by mutual punishment and reward. In large societies we have enforcement institutions. This paper shows how such institutions can emerge as a decentralized equilibrium. In a first stage, individuals invest in a public enforcement technology. This technology generates a sanctioning system whose effectiveness depends on the aggregate amount of invested resources. In a second stage, in which individuals contribute to the provision of a public good, the sanctioning system imposes penalties and rewards on deviations from the endogenous norm contribution. It is shown that even if group size goes to infinity public norm enforcement is supported in a noncooperative equilibrium. Psychological factors are not necessary but can be favorable for the emergence of effective public norm enforcement.