The mystery of why some people appear to have healthy lungs despite a lifetime of smoking has been explained by UK scientists.
The analysis of more than 50,000 people showed favourable mutations in people's DNA enhanced lung function and masked the deadly impact of smoking.
The Medical Research Council scientists say the findings could lead to new drugs to improve lung function.
But not smoking will always be the best option, they say.
Many, but not all, smokers will develop lung disease. But so too will some who have never touched a cigarette in their lives.
The researchers analysed the huge amount amount of health and genetic data from volunteers to the UK's Biobank project.
They looked at Chronic Obstructive Pulmonary Disease (COPD) which leads to breathlessness, coughing and repeat chest infections.
The condition is thought to affect three million people in the UK and includes diseases such as bronchitis and emphysema.
By comparing smokers and non-smokers as well as those with the disease and without they discovered sections of our DNA that reduce the risk of COPD.
So smokers with "good genes" had a lower risk of COPD than those with "bad genes".
Prof Martin Tobin, one of the researchers at the University of Leicester, said the genes seemed to affect the way the lungs grow and respond to injury.
But he told the BBC News website: "There doesn't appear to be any kind of magic bullet that would give anyone guaranteed protection against tobacco smoke - they would still have lungs that were unhealthier than they would be had they been a non-smoker.
"The strongest thing that people can do to affect their future health in terms of COPD and also smoking-related disease like cancer and heart disease is to stop smoking."
The habit also increases the risk of heart disease and cancers, which are not considered in this study.
The scientists also uncovered parts of the genetic code which were more common in smokers than non-smokers.
They seem to alter the brain's function and how easily someone can become addicted to nicotine, although that still needs to be confirmed.
Prof Tobin said the findings offered "fantastic new clues about how the body works that we really had little idea about before and it's those things that are likely to lead to some really exciting breakthroughs for drug development."
Their findings were presented at a meeting of the European Respiratory Society and published in the Lancet Respiratory Medicine journal.
Ian Jarrold, the head of research at the British Lung Foundation, said: "These findings represent a significant step forward in helping us achieve a clearer picture about the fascinating and intricate reality of lung health.
"Understanding genetic predisposition is essential in not only helping us develop new treatments for people with lung disease but also in teaching otherwise healthy people how to better take care of their lungs."