The easy-to-reach patients have been treated, and many of the rest are the hardest to help: heroin-addicted couriers and laborers from the poppy fields of the nearby Golden Triangle, and mountain villagers who do not speak Vietnamese and are barely connected to the health care system.

But the biggest threat is that the money is close to running out.

“Our TB program is cost-effective and has great impact,” said Dr. Nguyen Viet Nhung, its national director. “But I always emphasize that this is a preliminary success. We need to sustain it.”

To reach Vietnam’s ambitious goal of pushing prevalence rates down to 20 cases per 100,000 residents — essentially eliminating tuberculosis as a public health problem — its tuberculosis-control program needs to spend at least $66 million a year. It now spends about $26 million a year.

About $19 million of that comes from foreign donors, with more than a third from the United States, Dr. Nguyen said. Evidence of donor help is everywhere.

The expensive diagnostic machines in hospital laboratories bear stickers from the United States Agency for International Development or from The Global Fund to Fight AIDS, Tuberculosis and Malaria, 30 percent of whose budget is paid by the United States. But The Global Fund, the chief support of the tuberculosis program here, has long struggled to meet its fundraising goals, and Vietnamese officials worry about what happens when its current commitment ends in 2017. The White House tried to reduce the American contribution to the fund in fiscal year 2016 (Congress restored it), and proposed cuts to Usaid’s tuberculosis programs in both 2016 and 2017.