This paper studies the implications of education quality for the optimal allocation of public expenditure in a simple endogenous growth model with mandatory schooling and infrastructure spillovers. Education quality is inversely related to the degree of congestion in schools, which is itself measured in two ways: the proportions of teachers and students in the population, and the ratio of government spending on education to teaching capacity. The balanced-growth path is derived and the transitional dynamics associated with an increase in the degree of congestion are analysed. The growth-maximizing share of government spending on education is shown to depend negatively on the congestion parameter. Policy implications for the ‘quantity versus quality’ debate in schooling are also discussed.