Scientists have identified DNA changes that can cut a person's lifespan by up to three years.
They have discovered two separate areas of the human genome where differences in the DNA code may affect how long a person lives.
The two changes - known as variants - are relatively common in the population. More than two thirds of us will inherit a single copy of one of them from either our mother or father.
Having a copy of one variant may reduce expected lifetime by up to a year, the study found. Around three in 1000 people will inherit two copies of both variants and can expect to die an average of three years earlier, the team predicts.
One of the variants is linked to a gene associated with an increased risk of lung cancer and severe respiratory problems in people who smoke. The other is in a gene associated with Alzheimer's disease and high cholesterol.
The research also found that the variants had different effects on men and women's lifespans. The gene change linked to Alzheimer's disease had a greater effect on women while the variation associated with lung disease had greatest effect on men.
Researchers at the University of Edinburgh made the discovery by analysing genetic information from more than 152,000 people who participated in the UK Biobank study - a long-term record of the health of thousands of volunteers.
The study, published in the journal Nature Communications, was funded by the Medical Research Council.
Dr Peter Joshi, of the University of Edinburgh's Usher Institute of Population Health Sciences and Informatics, said: "Although the effect of these genetic variants on lifespan is surprisingly large, it is important to remember that this is only part of the story. Lifestyle has the greatest impact on how long we live and that is under our control."
Dr Jim Wilson, also of the University of Edinburgh's Usher Institute of Population Health Sciences and Informatics, said: "These discoveries are the tip of the iceberg. As more data become available later this year, we expect to see many more discoveries. Excitingly, some of these might have a beneficial effect on health."