Hordes of brain-munching undead terrorizing neighborhoods make for fun television and movies, but zombies could never be real … or could they?

There are, in fact, a growing number of documented examples in the animal kingdom of parasites that change their hosts’ behavior — and increasing evidence that humans are not immune to zombie-like manipulations.

The subject fascinates theoretical evolutionary biologist Athena Aktipis of Arizona State University, who hosts a podcast called “Zombified” that applies science to the types of apocalyptic stories that were first popularized by filmmaker George Romero in the 1960s and now are a staple horror genre.

“More than half of the species that we know on Earth are parasites,” Aktipis said.

One example is the Ophiocordyceps fungus, which releases spores that infect the carpenter ant’s body, allowing the fungus to take over the insect’s locomotive activity.

Eventually, it kills its host by forcing the ant to leave its nest and bite down on a piece of vegetation; a tetanus-like infection gives it lockjaw and it stays stuck to the grass.

The parasitic fungus then erupts out of its host’s head with a mushroom-like growth called a stroma. At night, when uninfected ants are out foraging, this growth shoots out more infectious spores and the two- to three-week cycle repeats itself.

“We’re totally convinced that the behaviors that the ant show are all to benefit the fungus,” said Charissa de Bekker, an assistant professor of biology at the University of Central Florida who is carrying out genetic research to better understand the takeover process.

Another example among insects comes from two wasp species: the crypt gall wasp and the parasitoid crypt-keeper wasp.

Kelly Weinersmith, a biology professor at Rice University who was part of the team that made the discovery, said that a healthy crypt gall wasp matures inside a compartment formed in an oak tree called a “crypt.” Eventually the larva grows up and chews its way out of the tree.

But when the parasitoid finds crypt gall wasp larvae, it lays its own egg in the crypt, and the parasite manipulates the host into chewing a hole that is too small to escape from — such that it can only stick its head out.

“After they get trapped there, the parasitoid eats (the crypt gall wasp’s) insides,” Weinersmith said.

“When the parasitoid is done developing, it chews a hole in the head of the host and emerges through its head — it’s all supercreepy.”

If you think nothing like that could ever happen to humans, think again.

The single-celled parasite Toxoplasma gondii may have infected around 40 million Americans, according to the U.S. Centers for Disease Control and Prevention.

The parasite “somehow evolved to make a rat get turned on by the smell of cat urine, so it goes up to a cat and snuggles with it, and then it gets eaten, which completes the life cycle of the toxoplasma — if that’s not zombification, then what is?” said Aktipis.

People can get infected by eating undercooked meat — or through their pet cats, especially when cleaning out their litter boxes.

Some studies have reported an association between brain infection of the parasite and personality traits such as risk-taking and aggression, though other research has disputed these findings.

Rabies, likewise, makes animals and people aggressive — and in some cases makes humans extremely sexually aroused.

There is even growing evidence that the bacteria in our gut change our emotions and behavior, including what we want to eat — the subject of another paper that Aktipis recently co-authored.

Certain tropes of zombie fiction are entirely unscientific.

For one, dead bodies decay rapidly, meaning the huge throngs of shambling zombies seen in “The Walking Dead” would quickly become incapacitated as their flesh and muscle disintegrated within days to a few weeks, depending on weather conditions.

And it would require a huge evolutionary leap for toxoplasma to do to humans what it does to rats.

But Aktipis, who organized the cross-disciplinary Zombie Apocalypse Medicine Meeting last year and plans another such conference in 2020, believes that gaming out such scenarios can be a useful — and fun — way of thinking about future threats.

She recommends keeping a go bag of vital supplies like first aid kits, duct tape that can be used to fashion a shoe or a weapon, and whiskey to sterilize water and wounds (or drink if things get really bad).

According to its website, the CDC also stands ready to provide assistance to determine the source of the infection, learn how it is transmitted and find a cure, “much like any other disease outbreak.”