This paper studies the dynamic effects of longevity on intergenerational policies and fertility, distinguishing between effects of expected and unexpected longevity gains. Old agents become poorer from unexpected longevity gains than from expected gains, as they cannot prepare (save) for the former in advance. In an overlapping-generations model with means-tested pay-as-you-go social security, we show that young agents reduce their fertility when longevity increases because they need to save more for their old age (“life-cycle effect”), and in the unexpected case, they also need to pay taxes to support the impoverished elderly (“policy effect”). Using cross-country panel data on mortality rates and social expenditure, we find that an unexpected increase in life expectancy at age 65 lowers total fertility rate growth and government family-related spending growth while raising government old-age spending growth.