In the 1970s, Western development agencies helped poor people in Bangladesh build 8.6 million tube wells — wells made by boring a steel tube into the ground — for clean drinking water.

It was a large-scale development effort, and it eventually became one of the most famous stories of aid gone wrong: It turned out the wells were contaminated with arsenic.

Starting in 1999, shortly after the arsenic was discovered, researchers and Bangladesh’s government launched a massive public health campaign warning people not to use the wells after all. In development circles, the episode became a major example of how unhelpful development organizations can make things worse for the people they’re trying to help.

But a new paper from the National Bureau of Economic Research says things are actually more complicated than that narrative.

Yes, there was arsenic in Bangladesh’s wells, and it may have posed a health threat. But in areas where people were encouraged to switch away from the wells, child mortality jumped by a horrifying 45 percent — and adult mortality increased too. It turns out that the alternatives to the wells, for most people in Bangladesh, were all worse — surface water contaminated with waterborne diseases, or extended storage of water in the home, which is also a major disease risk.

Is that worse than well water laced with low levels of arsenic? The paper reviews the complex, often contradictory literature around the effects of chronic low-level arsenic exposure and finds that it does increase your risk of cancer in old age. The authors conclude that risks seem to accumulate with more exposure, but the effects are still small next to the effects of unclean drinking water.

That means that, in encouraging people to switch away from the wells, development agencies swapped out a fairly limited risk for a much larger risk — and people died as a result.

“We worry about scary things like arsenic,” Rachel Glennerster, chief economist at the UK’s Department for International Development and one of the researchers who wrote the paper, told me. “But some of the everyday costs of things that seem not so scary, like diarrhea, are actually huge.”

Arsenic wasn’t killing people. Waterborne disease was.

The paper, titled “Throwing the baby out with the drinking water,” uses a clever methodology to estimate the effects of the switch away from arsenic-contaminated wells. Different areas of Bangladesh have different amounts of arsenic in their soil. That means some people had their wells test positive for arsenic (and were therefore motivated to stop using those wells) while other wells tested negative.

The people who tested positive switched to a new source of water. The study, authored by Nina Buchmann, Erica M. Field, Rachel Glennerster, and Reshmaan N. Hussam, finds that

while mortality rates were almost identical in contaminated versus uncontaminated households pre-1999, these outcomes diverged sharply immediately after the switching campaign: Post-2000, households with arsenic-contaminated wells exhibit a 46% increase in child mortality relative to those with arsenic-free wells, which coincides with the moment at which contaminated households were pushed to switch to more remote sources.

That is to say, there’s no detectable difference in mortality from the arsenic. But when the arsenic motivated people to switch to other sources of drinking water, their children died at much higher rates.

The researchers next looked into what could explain the jump in child deaths. They found that one factor determined how sharply child mortality would jump when people abandoned their wells: the distance to the nearest “deep tubewell,” which provided a source of safe, clean water. Even slight increases in distance had drastic effects on child mortality.

“This is just a way of very clearly illustrating the benefits of clean water, and indeed convenient clean water,” Glennerster told me. “What we’re finding is that your mortality rate is very tied to whether you have very close clean water.”

That means development experts and the government need to reconsider how to think about public health in Bangladesh. Especially in villages with no access to alternative sources of clean water, the researchers conclude, “this finding raises the question of whether use of shallow tube wells contaminated with arsenic should continue to be discouraged.” It might be that, by warning people off the arsenic-laced wells, we are putting them in even more danger.

The study underscores an important idea: Trade-offs are very real, especially in international development. It’s really important to look at what people are doing and compare it to their actual next-best choice, not to ideal choices they don’t even have — or your advice might inadvertently do them harm.

The best thing for water access in Bangladesh is to dig deeper, more-expensive wells that don’t pose any arsenic risk or any waterborne disease risk. But until those wells get built, scaring people off wells with low-level arsenic may in fact cost more lives.

Correction: This piece was updated to clarify the alternatives to shallow tubewell water.

Sign up for the Future Perfect newsletter. Twice a week, you’ll get a roundup of ideas and solutions for tackling our biggest challenges: improving public health, decreasing human and animal suffering, easing catastrophic risks, and — to put it simply — getting better at doing good.