DAR ES SALAAM, Tanzania — After a storied history of revolutionary defiance toward America — in which Tanzania played host to Angela Davis, Huey Newton and Malcolm X — this country can hardly get enough of the U.S. of A. Rumors still float among cabbies and tour guides that George W. Bush bought land here during his 2008 visit and plans on returning. When President Obama came in 2013, a main road, running scenically along the Indian Ocean, was renamed in his honor: Barack Obama Drive.

But locals now complain about the road’s upkeep. The traffic in Dar es Salaam is so bad that it is a cause of teen pregnancy (some girls trade sexual favors for rides on motor scooters that dart between cars). Why isn’t Obama Drive better maintained and widened? Where are the Americans? Isn’t it their responsibility?

It is possible, in any close relationship, for a history of generosity to become an expectation of benefit. On global health in particular, America and Tanzania have performed wonders together over the last decade. A cold chain for vaccines reaches from vast warehouses to distant villages. Antiretroviral drugs for HIV/AIDS are generally available. Anti-malaria campaigns have dramatically reduced prevalence.

In all of this, the Tanzanian government has been a good partner. And the Tanzanian people appreciate American help. Polls show that 75 percent of Tanzanians view America in a positive light — not a minor asset in a region (East Africa) where radicalism is a growing threat.

But amid this success, one statistic should cause concern. In 2002, Tanzania’s public sector accounted for about 25 percent of health expenditures in the country. A decade later, this had fallen to 21 percent — with foreign donors providing 48 percent of total health expenditures.

Tanzania has a strong economic growth rate. It recently recalculated its gross domestic product upward by 32 percent, bringing it near the low end of middle-income status. But the foreign share of health care spending is growing, while government spending — as a percentage of the total health effort — is declining. American embassy officials see a replacement effect at work. When donors increase health spending, government resources are shifted to building economic infrastructure.

This is a rational choice on the part of the government. But it is also a perverse incentive if we hope for Tanzania to gradually take over responsibility for its health sector. It is a problem across Africa, where growth rates and the discovery of natural resources (in Tanzania’s case, natural gas) are pushing countries toward middle-income status, but their health systems are still too weak for donors to withdraw support.

A number of African countries, including Tanzania, are working on health insurance plans that would pool risk and bring new resources from the public into the health sector. But how can donors encourage greater domestic investment in health?

For Gavi — the vaccine alliance — transition is built into the design of the program. All participating countries are required to pay a small amount per dose. And when nations reach the middle-income threshold, they are required to increase their contributions by 15 percent each year until they “graduate” and assume full cost.

This is part of Gavi’s attractiveness to donors — an inbuilt obsolescence. But when countries near graduation — and still have massive challenges of poverty and health access — will Gavi blink and soften its requirements? This hasn’t been tested.

PEPFAR (the President’s Emergency Plan for AIDS Relief) takes a different approach. It is using improved health data to precisely identify the regions and groups with the highest rates of HIV transmission, then saturating those targets with proven prevention techniques — early treatment, condom use and male circumcision. The goal is to make AIDS treatment more sustainable in the long run by reducing the future burden of disease.

It is extraordinary to watch a successful government program reinvent itself to follow the best data. In Tanzania, the PEPFAR pivot involves pulling resources from some areas and concentrating them on six regions. This strategy naturally creates tension with governments that view health equity as equal access for everyone. PEPFAR now defines health equity as concentrating resources where they are most needed — and have the best chance of bending down the curve of new infections.

Ten years after a massive American scale up of global health programs, success is properly measured in the millions of lives saved. Ten years from now, it should also be measured by the local capacity to save millions more.