The aim of the article is to theoretically investigate if a pay-as-you-go (PAYG) pension system is sustainable in the presence of a declining population and increasing longevity of the retired generation. For this purpose, we use an overlapping generation model with endogenous fertility, endogenous longevity and human capital accumulation in a small open economy. We find that pensions will always increase as long as it is beneficial for parents to invest in human capital. Furthermore, we get the result that the ratio between pension benefits and the consumption of the young generation will strive to a positive limit value, and that a pure PAYG pension system will not run into any solvency problem due to a decreasing fertility rate or ageing.