We introduce public spending, financed through income taxation, in the Ramsey model with heterogeneous agents. Public spending as a source of welfare generates more complex dynamics. In contrast to previous contributions focusing on similar models but with wasteful public spending, limit cycles through Hopf bifurcation and expectation-driven fluctuations appear if the degree of capital-labor substitution is large enough to be compatible with capital income monotonicity. Moreover, unlike frameworks with a representative agent, our results do not require externalities in production and are compatible with a weakly elastic labor supply with respect to wage.JEL classification: C62, E32, H23.