President Jimmy Carter has spent the past 30 years waging a war to eradicate guinea worm — a battle he has nearly won.

This makes Carter's wish at a press conference today — to discuss a cancer that has spread to his brain — especially poignant.

"I hope the last Guinea worm dies before I do." Pres Carter reflecting on the work of the Carter Ctr. pic.twitter.com/n9bOkf6apJ — Dr. Sanjay Gupta (@drsanjaygupta) August 20, 2015

Guinea worm is a debilitating parasitic disease that in the mid-1980s used to infect millions in the developing world. But thanks to the work of the Carter Center, there were only 17 cases of guinea worm counted in the first five months of 2015, a stunning public health victory.

Guinea worm has nearly disappeared — but there's still some work to go

The Carter Center, the NGO that has led the charge to eradicate guinea worm, has counted only 17 cases of the disease in the first five months of this year, compared with 68 in the equivalent time period last year. Here's the trajectory infection rates took from 1986 to 2008:

And note that yet more progress has been made between 2008 and this year; in 2013, there were a total of 148 cases, a nearly 97 percent reduction from the 2008 count.

It happened without a vaccine or cure

The treatment for guinea worm hasn't changed in thousands of years — and it's awful. To understand what it is, you need to know how the worm itself works, which is illustrated well in this Carter Center graphic:

Once the worm is exposed, treatment consists of gradually coaxing it out of the affected person, a process that, given that worms can be as long as a meter, can take days if not weeks. It's a hugely time-consuming and painful process. Other than antibiotics to prevent infection at the site of the wound, and painkillers to ameliorate the pain of the process, there's little drugs can do to help.

So if you can't vaccinate people or offer drugs to kill the worm larvae before they grow into worms, breed, and cause intense pain and debilitation, how has the disease been cut back so dramatically?

Education and infrastructure did most of the heavy lifting

According to Donald Hopkins, vice president for health programs at the Carter Center, a major tactic that made eradication feasible was public health education. The key problem was that people with the worm were submerging affected body parts in shared water sources; the exposed worm then expelled a "milky white liquid into the water that contains millions of immature larvae." Those larvae are eaten by water fleas (or "copepods"), which get into the digestive systems of people drinking the water.

Once there, the larvae burst out of the copepods and then work their way out of the small intestine and into the body cavity, where they mate and grow into full worms. The full worms make their way out through the lower body or another body part. At the point of exit, the worms form blisters, which burst and expose the worm, such that if it's brought back to a common water source, the cycle repeats itself.

The cycle was broken by a) providing finely woven cloth filters that remove the copepods, preventing people from getting larvae in their systems, b) treating water sources with temephos, which kills the copepods, c) providing clean drinking water sources, d) conducting detailed and rigorous case monitoring of cases and outbreaks, and e) teaching affected people to not deal with their wounds by soaking them in a local water source. Dr. Michele Barry explained how the last works in practice in the New England Journal of Medicine:

In Uganda, the eradication program has employed elderly men as "pond caretakers" to guard ponds against contamination by worms emerging from people. When infected people are identified at a pond, the caretakers assist them with water gathering, preventing contamination of the water, and distribute nylon filters for ongoing prevention. Cash rewards are sometimes offered to those who report cases or to infected villagers who agree to be quarantined while the worm is emerging; often such persons receive free care and food during that period.

It was remarkably cheap

Hopkins estimates the total cost of the three-decade-long eradication campaign at about $350 million. Any way you slice it, that's a bargain given the amount of human suffering averted. A 2011 Center for Global Development case study pegged the cost at $5 to $8 per person treated; a 1997 analysis by the World Bank estimated that if one only considers the increase in agricultural productivity that would result from eradicating the worm (achieved by eliminating worm-related work absences), and no other potential benefits, the rate of return is 29 percent. In other words, for every $1 invested in the campaign, $1.29 came back in the form of greater agricultural output and earnings.

Even better, the campaign comes with a number of positive externalities that help accomplish other global development tasks. There's the increase in agricultural productivity, for one thing, but additionally, researchers at the Carter Center and Emory point out that school attendance can tick up when an area is rid of guinea worm. They cite a study in Nigeria that found that villages given wells (providing a source of clean, worm-free drinking water) saw the incidence of the disease fall 62.5 percent as attendance at school rose 50 percent and enrollment went up by 12 percent.

Cater has devoted much of his work outside the presidency to eliminating guinea worm. It's only fitting that his final wish is to see it completed in his lifetime.

VIDEO: The battle against infectious disease