© 2017 Abío, Patxot, Sánchez-Romero & Souto. BACKGROUND The demographic transition experienced by developed countries produces initial positive effects on economic growth - the first demographic dividend - which can be extended into a second demographic dividend if baby boomers' savings increase capital accumulation. Nevertheless, aging might reverse this process if dissaving of elderly baby boomers and the pressure on the pay-as-you-go financed welfare state reduce savings and capital. OBJECTIVE The aim of this paper is to evaluate the extent to which demographic dividends in Spain provide an opportunity for the reform of the welfare state system for an aging population. METHODS We decompose demographic dividends using a general equilibrium overlapping generations model with realistic demography and public transfers from the National Transfer Accounts database. This allows us to capture the endogenous evolution of savings and capital accumulation and, hence, the second demographic dividend. RESULTS When baby boomers enter the labor market, the purely demographic support ratio increases and this positive effect is extended by composition changes in the age structure of workers. When they start saving, the second demographic dividend arises, while its total net effect depends both on the strength of the aging process and on transfer size. CONCLUSIONS The derived decomposition shows that the second demographic dividend might also disappear. Sharp population aging in Spain implies that capital will shrink drastically after 2040. Before this, there seems to be margin for reforms; however, an extension of the welfare state toward the Nordic model would considerably reduce capital. CONTRIBUTIONS This paper contributes to the debate on the effects of demographics on economic growth by decomposing demographic dividends and investigating the impact of different welfare state transfer systems on the second demographic dividend.