When 14-year-old Michael Riley Jr. arrived at Texas Children's Hospital in Houston earlier this month with an unbearable headache the doctors knew immediately that it was serious. They had just treated a child with similar symptoms who was infected by a rare "brain-eating" amoeba, and they knew they had no time to waste. Nearly all cases of infection with the organism, naegleria fowleri, have been fatal.

Riley, a three-time Junior Olympian, had been swimming with his track team in a local lake in the days before he fell ill, and his doctors believed the amoeba entered his body through his nose when he jumped in, his parents wrote on a GoFundMe page for the teen. The organisms then attach themselves to a nerve that goes to the frontal lobe of the brain.

One of the first calls the doctors made was to the Centers for Disease Control and Prevention in Atlanta to request a drug from a little-known stockpile of investigational medicines that the government keeps for emergencies. Called miltefosin, the drug is used to treat a rare tropical parasitic disease, but has also shown promise in fighting off infections from single-celled organisms found in warm freshwater or soil including the one that had gotten into Riley's body.

Miltefosin, usually used in combination with antibiotics, antifungals and a cooling treatment, has played a role in saving the only three Americans to ever recover from a naegleria fowleri infection in the past 35 years. Perhaps the most well-known case is that of Kali Hardig, who was 12 in 2011 and developed a high fever, headache and nausea after swimming in a waterpark. After being treated with the experimental drug and 22 days in intensive care, she made a full recovery and returned to school.

In Riley's case, however, the treatment didn't work, and his family said in a statement that he died on Sunday.

In the past 35 years, 134 people, including Riley, have suffered from a naegleria fowleri infection.

Until two years ago, the only source for the drug was in Germany. It could take over a week to make its way to the United States, and sometimes arrived too late to make a difference to patients in need. In August 2013, the CDC announced that it would make miltefosine available directly to doctors for treatment of what are known as free-living amoeba or FLA infections.

"FLA infections are considered to be “low incidence but high impact” — meaning, they are rare but deadly. Because of this, miltefosine has its own pager number that physicians can access 24/7," the CDC said in a recent blog post, adding that last year it sent 14 shipments to doctors.

Read more: