Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Smoking scars DNA in clear patterns, researchers reported Tuesday. Most of the damage fades over time, they found — but not all of it.

Their study of 16,000 people found that while most of the disease-causing genetic footprints left by smoking fade after five years if people quit, some appear to stay there forever.

A customer smokes a cigarette in a cafe in Prague, Czech Republic, May 25, 2016. DAVID W CERNY / Reuters, file

The marks are made in a process called methylation, which is an alteration of DNA that can inactivate a gene or change how it functions -- often causing cancer and other 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," said Roby Joehanes of Hebrew SeniorLife and Harvard Medical School.

Heart disease and cancer are both caused by genetic damage -- some of it inherited, but most of it caused by day-to-day living. Smoking is one of the biggest culprits.

"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," Joehanes said.

Related: Black Doctors Call on Obama to Ban Menthol Cigarettes

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The team examined blood samples given by 16,000 people taking part in various studies going back to 1971. In all the studies, people have given blood samples and filled out questionnaires about smoking, diet, lifestyle and their health histories.

"Our study has found compelling evidence that smoking has a long-lasting impact on our molecular machinery."

They found smokers had a pattern of methylation changes affecting more than 7,000 genes, or one-third of known human genes. Many of the genes had known links to heart disease and cancers known to be caused by smoking.

Among quitters, most of these changes reverted to the patterns seen in people who never smoked after about five years, the team reported in the American Heart Association journal Circulation: Cardiovascular Genetics.

But smoking-related changes in 19 genes, including the TIAM2 gene linked to lymphoma, lasted 30 years, the team found.

Related: Just 15 Percent of US Adults Smoke

"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," said Dr. Stephanie London of the National Institute of Environmental Health Sciences, who directed the team.

"Equally important is our finding that even after someone stops smoking, we still see the effects of smoking on their DNA," London said.

Some of the affected genes had not been associated with the damage caused by smoking before. It might be possible to use them as "markers" to see who is at risk of smoke-related diseases in the future.

They might also be targets for new drugs to treat the damage done by cigarette smoke, the researchers said.

Smoking is the biggest cause of preventable illness, killing more than 480,000 Americans every year, according to the Centers for Disease Control and Prevention.

Globally, it kills about 6 million people a year through cancer, heart disease, lung disease and other illnesses.

Smoking rates have plummeted in the U.S. and now only about 15 percent of U.S. adults smoke — and just 11 percent of high school students smoke.

Related: Nearly Half of Teens Breathe Secondhand Smoke

Quitting has clear benefits, even late in life. But it doesn’t wipe the slate clean.

"Even decades after cessation, cigarette smoking confers long-term risk of diseases including some cancers, chronic obstructive pulmonary disease, and stroke," London's team wrote. "The mechanisms for these long-term effects are not well understood. DNA methylation changes have been proposed as one possible explanation."