Smoking leaves an "archaeological record" of the hundreds of DNA mutations it causes, scientists have discovered.
Having sequenced thousands of tumour genomes, they found a 20-a-day smoker would rack up an average of 150 mutations in every lung cell each year.
The changes are permanent, and persist even if someone gives up smoking.
Researchers say analysing tumour DNA may help explain the underlying causes of other cancers.
Pamela Pugh, 69, was diagnosed with lung cancer in 2013. She started smoking aged 17 and quit in her early 50s.
But she said: "Even though I gave up many years ago, the effects of smoking caught up with me.
"Had I known as a teenager that smoking caused mutations which would stay with me for life then I would never had started".
'Mysterious and complex'
The study, in the journal Science, was carried out by an international group, including the Wellcome Trust Sanger Institute in Cambridgeshire and the Los Alamos National Laboratory in New Mexico.
The analysis shows a direct link between the number of cigarettes smoked in a lifetime and the number of mutations in tumour DNA.
The authors found that, on average, smoking a packet of cigarettes a day led to:
- 150 mutations in each lung cell every year
- 97 in the larynx or voice box
- 23 in the mouth
- 18 in the bladder
- six in the liver
Joint lead author Prof Sir Mike Stratton, from the Wellcome Trust Sanger Institute, said: "The more mutations there are, the higher the chance that these will occur in the key genes that we call cancer genes, which convert a normal cell into a cancer cell."
The researchers said that in tissues such as the lung, which are directly exposed to smoke, they could find the mutational signature of the chemicals in tobacco smoke, of which at least 60 are carcinogens.
However, they could not find this same pattern in tissues such as the bladder, which are not directly exposed.
Prof Stratton said in these organs smoking seemed to be accelerating a natural mutational process, but how it did this was "mysterious and complex".
He said the same investigative approach could be used with other cancers where the underlying causes were less well understood.
"By looking in the genomes of the cancers, we will find the archaeological traces of past exposures which have been responsible for generating the cancers and that may potentially lead to prevention," he said.
Dr David Gilligan, consultant oncologist at Papworth Hospital and Roy Castle Lung Foundation trustee, said: "For every 150 mutations in the cell each year, that is 150 opportunities for lung cancer to develop.
"Lung cancer has been at the bottom of the survival league for many years, but there are many exciting developments, including immunotherapy and genetically targeted drug treatments."
Ms Pugh has received treatment at Papworth and Addenbrooke's Hospitals in Cambridgeshire.
She has just spent six months on a trial of a drug that aims to disrupt the genes that drive the growth of lung cancer.
Participants in the Matrix trial have DNA from their tumours examined to check they have genes that may respond to the drug.
But a scan has shown the tumour in Ms Pugh's right lung is growing, and she has had to leave the trial.
She will now undergo more chemotherapy and radiotherapy.
There are 35,000 deaths a year in the UK from lung cancer, and it is estimated that nine out of 10 cases are preventable.