Much research suggests democracies invest more in human capital formation than dictatorships. In particular, scholars have suggested that democracies outspend autocracies on education, due to electoral and interest group pressures. However, some democracies spend no more on education - and some spend much less - than autocracies. What explains this variation within democracies? The answer is the influence of landed agricultural elites. Urban industrial elites support human capital investment because it leads to higher rates of return even if wages increase. Yet greater education spending encourages out-migration from the countryside, reducing the supply and increasing the price of agricultural labor. Given the differential impact of education spending across economic sectors, the effect of democracy on education spending may be conditional on the power of landed elites. We test this argument in two ways. First, we run a series of time series cross-sectional regressions on data from 107 countries for the period 1970 to 2000. Second, we conduct a difference-in-difference analysis, comparing countries that democratize at high versus low levels of land inequality, for 73 countries for the same time period. Results confirm a negative relationship between the power of landed elites and investment in public education under democracy, adding important and novel insight into the sources of differences in public-goods spending and human capital investment both within across political regimes.