A study found that smoking can damage the DNA, permanently altering nearly 7,000 genes that can contribute to the development of smoking-related illnesses. Most damage, which can be seen in clear patterns, heals over time but some remains.

The study published online Tuesday in the American Heart Association’s journal Circulation: Cardiovascular Genetics found that smoking leaves its “footprint” on the genome through DNA methylation, the process by which cells control gene expression.

Researchers believe that this process could reveal the individual’s smoking history and help identify potential targets for therapy. They added that this study is the largest one examining the effects of smoking on DNA methylation.

“These results are important because methylation, as one of the mechanisms of the regulation of gene expression, affects what genes are turned on, which has implications for the development of smoking-related diseases,” Stephanie J. London, last author and deputy chief of the Epidemiology Branch at the National Institute of Environmental Health Sciences, said in a statement.

“Equally important is our finding that even after someone stops smoking, we still see the effects of smoking on their DNA,” she added.

Researchers used blood samples collected from 16,000 people to analyze the DNA methylation sites across the human genome. The participants belonged to 16 groups from the Cohorts for Heart and Aging Research in Genomic Epidemiology Consortium and one group from the Framingham Heart Study.

Researchers compared the methylation sites in current and former smokers to those who had never smoked and found that nearly one-third of known human genes, or 7,000 genes, were altered due to smoking.

Most of the sites in people who quit smoking returned to levels seen in non-smokers within five years of quitting. But some DNA methylation sites remained damaged even after 30 years since quitting.

Researchers added that the affected sites may mark genes that are potentially important to former smokers who are still at an increased risk of developing certain diseases.

“Our study has found compelling evidence that smoking has a long-lasting impact on our molecular machinery, an impact that can last more than 30 years,” Roby Joehanes, first author and an instructor at Harvard Medical School in Boston, said in the statement. “The encouraging news is that once you stop smoking, the majority of DNA methylation signals return to never smoker levels after five years, which means your body is trying to heal itself of the harmful impacts of tobacco smoking.”

According to the Centers for Disease Control and Prevention, nearly 40 million adults in the country smoked cigarettes. Cigarette smoking accounts for one in every five deaths or over 480,000 deaths every year in the United States.