Animal lifespan is determined by extrinsic and intrinsic factors causing mortality. According to the evolutionary theories of senescence, when mortality pressures are low, animals delay reproduction. This enables species to grow more slowly and, consequently, natural selection can act against harmful mutations in adulthood, thereby increasing lifespans. To test predictions of these theories we assembled a dataset on the maximum longevities and relevant ecological variables of 1320 reptilian species. Correcting for phylogeny, we modelled the link between reptile longevity and factors such as body size, microhabitat, activity period, insularity, annual temperature, temperature seasonality, elevation and clutch size that we hypothesized will affect extrinsic mortality rates and hence lifespan. Body mass explained a small proportion of the variance in reptile longevity. Species living on islands, and in colder and more seasonal environments, lived longer. Observed maximum longevity was positively associated with the number of individuals used to estimate it. Our results suggest that species exposed to reduced extrinsic and intrinsic mortality pressures (lower predation, lower metabolic rates and shorter activity periods) live longer. Sampling more individuals increases the chances of finding older specimens and should be corrected for when studying maximum longevity. [ABSTRACT FROM AUTHOR]