Less smoking would mean saving millions of people from dying of tuberculosis worldwide, according to a new study.

Researchers at the University of California, San Francisco used a mathematical model of tuberculosis epidemics to figure out how smoking rates would affect World Health Organization regions from 2010 to 2050.

Researchers also incorporated changing trends in case detection, HIV prevalence, smoking, and treatment success, according to the study's abstract.

They found that less smoking would mean saving more than 20 million lives.

Aggressively lowering the prevalence of tobacco smoking could reduce smoking-attributable deaths from tuberculosis by 27 million by 2050, the paper read, Agence France-Presse reported.

Researchers surmise that smoking rates worldwide will continue to increase. Even if smoking rates remain the same, researchers found that there will still be millions of death from tuberculosis.

Tobacco smoking could substantially increase tuberculosis cases and deaths worldwide in coming years, undermining progress towards tuberculosis mortality targets, the paper's abstract read.

The study was published online in the British Medical Journal.