Scientists have discovered what they say are four different species of "zombie fungus" in the Brazilian rainforest, which take over the brains of their host ants, forcing them to move to a location ideally suited to the fungus before killing them.

In a study published March 2 in the journal Plos ONE, researchers from Brazil, the United Kingdom and the United States say they began to investigate after noticing different types of fungus growing out of the bodies of carpenter ants.

"This so-called zombie or brain-manipulating fungus alters the behaviour of the ant host, causing it to die in an exposed position, typically clinging onto and biting into the adaxial surface of shrub leaves," the authors write.

The fungus then grows — usually out of the ant's head and neck region — and releases its spores.

The fungus, Ophiocordyceps, was originally thought to be a single species, but the researchers determined that there were actually four species at work.

"It is tempting to speculate that each species of fungus has its own ant species that it is best adapted to attack," study leader David Hughes, an entomologist at Penn State University, told National Geographic.

"This potentially means thousands of zombie fungi in tropical forests across the globe await discovery," he told the magazine. "We need to ramp up sampling - especially given the perilous state of the environment."