Models of life history evolution predict optimal traits of a simplified organism under various environmental conditions, but they at most acknowledge the existence of ageing. On the other hand, genetic models of ageing do not consider the effects of ageing on life histroy traits other than fecundity and longevity. This paper reports the results of a dynamic programming model which optimizes resource allocation to growth, reproduction and somatic repair. A low extrinsic (environmentally caused) mortality rate and high repair efficiency promote allocation to repair, especially early in life, resulting in delayed ageing and low growth rates, delayed maturity, large body size and dramatic enhancement of survival and maximum lifespan. The results are generally consistent with field, comprative and experimental data. They also suggest that the relationships between maximum lifespan and age at maturity and body size observed in nature may be by–products of optimal allocation strategies.