Last week, nine-year-old Hally Yust died after contracting a rare brain-eating amoeba infection while swimming near her family’s home in Kansas.

The organism responsible, Naegleria fowleri, dwells in warm freshwater lakes and rivers and usually targets children and young adults. Once in the brain it causes a swelling called primary meningoencephalitis. The infection is almost universally fatal: it kills more than 97 percent of its victims within days.

Although deadly, infections are exceedingly uncommon—there were only 34 reported in the U.S. during the past 10 years—but evidence suggests they may be increasing. Prior to 2010 more than half of cases came from Florida, Texas and other southern states. Since then, however, infections have popped up as far north as Minnesota.

“We’re seeing it in states where we hadn’t seen cases before,” says Jennifer Cope, an epidemiologist and expert in amoeba infections at the U.S. Centers for Disease Control and Prevention. The expanding range of Naegleria infections could potentially be related to climate change, she adds, as the organism thrives in warmer temperatures. “It’s something we’re definitely keeping an eye on.”

Still, “when it comes to Naegleria there’s a lot we don’t know,” Cope says—including why it chooses its victims. The amoeba has strategies to evade the immune system, and treatment options are meager partly because of how fast the infection progresses.

But research suggests that the infectioncan be stopped if it is caught soon enough. So what happens during an N. fowleri infection?

The microscopic amoebae, which can be suspended in water or nestled in soil, enter the body when water goes up the nose. After attaching to the mucous membranes in the nasal cavity, N. fowleri burrows into the olfactory nerve, the structure that enables our sense of smell and leads directly to the brain. It probably takes more than a drop of liquid to trigger a Naegleria infection; infections usually occur in people who have been engaging in water sports or other activities that may forcefully suffuse the nose with lots of water—diving, waterskiing, wakeboarding, and in one case a baptism dunking.

It turns out that "brain eating" is actually a pretty accurate description for what the amoeba does. After reaching the olfactory bulbs, N. fowleri feasts on the tissue there using suction-cup-like structures on its surface. This destruction leads to the first symptoms—loss of smell and taste—about five days after the infection sets in.

From there the organisms move to the rest of the brain, first gobbling up the protective covering that surrounds the central nervous system. When the body notices that something is wrong, it sends immune cells to combat the infection, causing the surrounding area to become inflamed. It is this inflammation, rather than the loss of brain tissue, that contributes most to the early symptoms of headache, nausea, vomiting and stiff neck. Neck stiffness in particular is attributable to the inflammation, as the swelling around the spinal cord makes it impossible to flex the muscles.

As N. fowleri consumes more tissue and penetrates deeper into the brain, the secondary symptoms set in. They include delirium, hallucinations, confusion and seizures. The frontal lobes of the brain, which are associated with planning and emotional control, tend to be affected most because of the path the olfactory nerve takes. “But after that there’s kind of no rhyme or reason—all of the brain can be affected as the infection progresses,” Cope says.

Ultimately what causes death is not the loss of grey matter but the extreme pressure in the skull from the inflammation and swelling related to the body’s fight against the infection. Increasing pressure forces the brain down into where the brain stem meets the spinal cord, eventually severing the connection between the two. Most patients die from the resulting respiratory failure less than two weeks after symptoms begin.

The threat of contracting an N. fowleri infection is remote (vastly more people die every year from drowning), but you can take some measures to lower your risk even further. Cope recommends using nose plugs and not immersing your head fully under water when swimming. She also counsels against kicking up sediment, which can shake the amoeba loose.

More effective treatments may be on the horizon. Last year, the U.S. Food and Drug Administration approved Miltefosine, originally intended as an anti-cancer treatment. In 2013, two people in the U.S. survived N. fowleri when they took the drug (and others) soon after being infected.

And last month, scientists sequenced the amoeba’s genome for the first time. Their insights may help us understand what makes it so virulent and point the way to better treatments.

Until then, hold your nose.