Most previous studies have examined the association between mortality and deprivation at only one point in time. However, risk accumulates over the life course. The design of the study was ecological. Its aims were to explain inequalities in total and cause-specific mortality between geographical areas in relation to the lifestyle and health behaviours of the resident populations and the area levels of deprivation in 1981 and in 1921-40. Data on health behaviour from the 1985 Heartbeat Wales Community Survey were evaluated in light of Welsh mortality rates for the period 1981-99, 1981 census data on socioeconomic position and the infant mortality rates in 1921-40. Negative binomial models were carried out to investigate the district-level association of mortality with deprivation (infant mortality in 1921-40, Carstairs score in 1981, combined index of deprivation) independently from the personal habits and characteristics of the resident population. There was an increased risk of death in deprived areas compared with more wealthy ones. Both infant mortality (a proxy of material deprivation during the time in which the 50-59-year-old individuals were born or were children) and Carstairs scores (a proxy of deprivation during adulthood) were strongly associated with recent mortality. Deprivation had stronger effects in women than in men, the only exception being the effects of later life deprivation on lung cancer. Area characteristics at different points of time may help to explain geographical inequality in mortality.