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".
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."
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.