This paper studies a model where the existence of a pension system is decided by majority voting. We assume that individuals have the same income but different longevity. Retirement is voluntary and the pension system is characterised by a payroll tax on earnings and a flat pension benefit. Individuals vote only on the tax level. We show that a pension system emerges when there is a majority of long-lived individuals and that voluntary retirement enables to lower the size of the transfers received by the long-lived. A rise in average longevity will also increase the size of the pension system.