A zombie ant fungus "knows" its host, and only releases brain-controlling chemicals when it finds itself attached to its preferred ant species, according to a new study.

Parasitic fungi from the genus Ophiocordyceps - also known as the "zombie ant fungus" - control their ant hosts by inducing a biting behavior. Although these fungi can infect many different types of insects, they prefer a certain kind of ant in particular, and wait to attack until they find such a desirable host.

The fungus has evolved a mechanism that induces hosts to die, attached by their mandibles, to plant material. This provides a platform from which the fungus can grow and shoot spores to infect other ants.

To gain insight into this phenomenon, researchers focused on the chemicals used to control the behavior of ants. The scientists used a newly discovered fungal species from North America -- initially called Ophiocordyceps unilateralis sensu lato - that normally controls an ant species in the genus Camponotus.

To determine whether the fungus evolved to control the behavior of one ant species over another, researchers removed brains from different ant species to determine what chemicals the fungus produced in the presence of each brain.

"The brain of the target species was the key to understanding manipulation," lead author Charissa de Bekker, a Marie Curie Fellow in Penn State's College of Agricultural Sciences, explained in a university news release.

Using metabolomics, the researchers could determine precisely the chemical crosstalk between the fungus and the ant brain it grew alongside.

"We could see in the data that the fungus behaved differently in the presence of the ant brain it had co-evolved with," de Bekker said.

Among thousands of unique chemicals, two stood out in particular: the neuromodulators guanobutyric acid (GBA) and sphingosine. Both of these chemicals were abundant when the fungus was grown in the presence of brains of its target species.

"It is impressive that these fungi seem to 'know' when they are beside the brain of their regular host and behave accordingly," de Bekker added.

The research was published in the journal BMC Evolutionary Biology.