In the early 1990s, Joel Weinstock, a gastroenterologist, encountered a puzzle. The prevalence of inflammatory bowel disease (I.B.D.) across North America increased markedly during the 20th century. Many thought that “bad” genes would eventually explain the spike, but Weinstock didn’t buy it. In areas where fewer than two generations ago the I.B.D. incidence might have been as low as 1 in 10,000, it was now 1 in 250. A defective gene couldn’t spread that quickly, he reasoned. It had to be something in the environment. But what? Stumped, Weinstock tried turning the question around. Instead of asking what triggered I.B.D., he asked what, before the 20th century, protected against it?

At the time, Weinstock, then at the University of Iowa, was editing a book on parasitic worms. These worms, or helminths, have a paradoxical effect on the host. Rather than induce inflammation, which is the body’s typical response to invasion, the intruders calm the host immune system. They force a peace, scientists think, to avoid eviction and keep the host  their home and food source  as healthy as possible. As Weinstock considered the I.B.D. puzzle, he wondered if immune manipulation by worms could incidentally protect against other diseases.

Comparison of the prevalence of I.B.D. and surveys of worm-infestation rates revealed a telling pattern. About 10 years after improved hygiene and deworming efforts reduced worms in a given population, I.B.D. rates jumped. Weinstock had his hypothesis: after a long coevolution, the human immune system came to depend on the worms for proper functioning. When cleaner conditions and new medicines evicted the worms from our bodies, the immune system went out of kilter. “Hygiene has made our lives better,” says Weinstock, now at Tufts University. “But in the process of eliminating exposure to the 10 or 20 things that can make us sick, we’re also eliminating exposure to things that make us well.”