The development of the welfare state in the Western economies between 1930 and 1990 coincided with a puzzling pattern in the taxation of top incomes. Effective tax rates at the top increased sharply during the 1930s and 1940s, but then gradually decreased, even as social transfers continued rising. We propose a new theory of the development of the welfare state to explain these facts. Our main insight is that social insurance and top income taxation are substitutes for averting social conflict. Our detailed arguments build on the policy histories of the US, UK and Sweden.