Raquel Loreto is a zombie hunter, and a good one. But traipsing through dried leaves in a hot forest in Sanda, at the southern end of Japan, she needed a guide. Just a few months before, she’d been on the internet and come across the work of artist Shigeo Ootak, whose fantastical images depict humans with curious protrusions erupting from their heads. She got in touch, and he invited her to Japan for a hike to find his inspiration.

Ootak knew precisely where to look: six feet off the ground. And there in a sparse forest, that’s where they found it: the zombie ant, an entrancing species with two long hooks coming out of its back. By now you may have heard its famous tale. A parasitic fungus, known as Ophiocordyceps, invades an ant’s body, growing through its tissues and soaking up nutrients. Then it somehow orders its host to march out of the nest and up a tree above the colony’s trails. The fungus commands the ant to bite onto the vein of a leaf, then kills the thing and grows as a stalk out of the back of its head, turning it into a showerhead raining spores onto victims down below.

That’s how it all goes down in South American forests, where Loreto had already spent plenty of time. But the zombie she found on her hike in Japan was different. First of all, the fungus had driven it higher up a tree. And two, it hadn’t bitten onto a leaf, but had wrapped itself around a twig, hanging upside down.

See, in the tropics, leaves stay on trees all year—but in Japan, they wither and fall. Same goes for zombie ants in the southern United States. By ordering the ant to lock onto a twig, the fungus helps ensure it can stay perched long enough to mature and rain death on more ants. In a study out today in the journal Evolution, Loreto and her colleagues show that divergence between leaf-biting and twig-biting seems to have been a consequence of ancient climate change. So who knows, modern climate change may also do interesting things to the evolution of the parasite.

Come back in time with me 47 million years to an unrecognizable Germany. It’s much hotter and wetter. As such, evergreen forests grow not only up through Europe, but all the way up to the arctic circle. One day, a zombie ant wanders up a tree and bites onto the vein of a leaf, which conveniently enough gets fossilized. Time goes on. The climate cools, and Germany’s wet forests turn temperate.

Almost a decade ago, Penn State entomologist David Hughes looked at that fossil leaf and noticed the tell-tale bite marks of a zombie ant. “Given the fossil evidence in Germany, we know leaf biting occurred then,” say Hughes, a coauthor on the paper. “We suspect that it was also present in North America, and as those populations responded to climate change and the cooling temperature, we see a shift from biting leaves to dying on twigs.”