What are the origins and consequences of the state as a provider of public goods? We study public goods provision established through new laws in German cities during the 1500s. Cities that adopted the laws subsequently began to differentially produce and attract human capital and to grow faster. Legal change occurred where ideological competition introduced by the Protestant Reformation interacted with local politics. We study plagues that shifted local politics in a narrow period as sources of exogenous variation in public goods institutions, and find support for a causal interpretation of the relationship between legal change, human capital, and growth.