Tuberculosis kills almost two million people a year. A perfect vaccine could save many of them, but the one now in use — invented in the 1920s and known as BCG, for Bacillus Calmette-Guérin — has so many flaws that some countries, including the United States, have never adopted it.

Yet a new study published in the International Journal of Epidemiology concludes that the vaccine protects against tuberculosis for substantially longer than was previously known. Health officials on the verge of dropping vaccination in Latin America or Central Europe might want to reconsider, said the study’s lead author, Dr. Punam Mangtani, an epidemiologist at the London School of Hygiene and Tropical Medicine.

Countries that are doing poorly at getting the vaccine to all their children might want to try harder, she added.

With the BCG vaccine, timing is crucial. The risk of dying from tuberculosis is high in infancy, wanes in childhood and then increases again after puberty.

But BCG’s protective effect fades after a few years and booster shots do not restore it — so public health officials must decide when to give it.

In countries where tuberculosis is widespread, or when family members have it, the World Health Organization recommends giving the vaccine at birth. Officials in 158 countries do that, but others wait until children are in the second danger period after puberty.

Like smallpox vaccine, BCG is delivered in the skin and leaves a small round scar. In Britain, it was given to 13-year-olds until 2005; that was discontinued as the disease largely died out there.

Dr. Mangtani’s study compared tuberculosis rates in more than 1,800 Britons born between 1965 and 1989. She found that those who were vaccinated as teens were half as likely to develop tuberculosis during the next 20 years as those who never were.

The figures had to be adjusted to account for many confounding factors: participants who had been raised in poverty, who had ever been homeless or in prison, and who abused alcohol were more likely to have tuberculosis — whether they had been vaccinated or not.

After 20 years, BCG’s protection waned so much that the risk of tuberculosis was the same in the both groups.

The United States, the Netherlands and other countries keep tuberculosis at bay by frequent testing — especially of new immigrants — and treating those who have it. BCG vaccine can disrupt such efforts by giving false positives on some tests.