An evolutionary battle between fungi and bacteria on hedgehogs' skin gave rise to a type of antibiotic-resistant bacteria long before humans started using the antibiotics that were thought to lead to such superbugs, a new study reveals.

Researchers traced some lineages of the superbug MRSA, or methicillin-resistant Staphylococcus aureus, to a parasitic fungus found on the skin of European hedgehogs (Erinaceus europaeus).

The fungus secretes antibiotics to fight and kill Staphylococcus aureus bacteria (also found on hedgehogs); to stay alive, the bacteria, in turn, evolved antibiotic resistance that later crossed into livestock and humans, the research team reported in a new study.

While the use of antibiotics often drives the evolution of superbugs, this study shows the origins of some antibiotic-resistant bacteria in nature.

"We know the resistance genes got into pathogen genomes before humans were using antibiotics, but this really describes a mechanism of how that might happen," study co-author Ewan Harrison, a researcher at the University of Cambridge and the Wellcome Sanger Institute in the U.K., told Live Science.

Related: 5 ways gut bacteria affect your health

MRSA is a strain of staph bacteria that resists antibiotics and is therefore harder to treat if it gets into the body of humans or livestock and causes disease. The researchers investigated mecC-MRSA, a relatively rare form of the superbug that's responsible for about 1 in 200 human MRSA infections, according to a statement released by the University of Cambridge.

The mecC-MRSA was discovered in 2011 and was thought to have emerged in cows given large amounts of antibiotics. However, previous research has also found that up to 60 percent of European hedgehogs carry it. The hedgehogs' fungus, Trichophyton erinacei, creates its own penicillin antibiotics naturally to fight off bacteria.

Harrison was part of an international research team that sequenced genomes of the parasitic fungus on the hedgehogs and found the genes responsible for producing the penicillin antibiotics that kill staph bacteria.

They then sequenced the bacteria and dated the penicillin-resistant genes by measuring the number of certain mutations in the genome that are known to occur at a fixed rate each year and counting backward, according to Harrison.

They found that the bacteria had resistance to methicillin, a form of penicillin, in the 1800s, long before the clinical use of penicillin began in the 1940s.

The researchers think this type of MRSA probably first evolved in hedgehogs, though they aren't sure how mecC-MRSA crossed into humans.

"We know that these resistance genes exist in the soil and soil bacteria, and animals like hedgehogs and other wildlife obviously have much more contact with soil on a day-to-day basis than most of us do," Harrison said.

The superbug could have jumped to humans through direct contact with hedgehogs, the authors said. Harrison stressed, however, that people shouldn't fear hedgehogs for this reason.

"I don't think hedgehogs are a risk," Harrison said. "I think that's important to get across." The mecC-MRSA is also found in livestock, so these animals, or another unidentified animal, may have been intermediaries.

"It just shows evolutionary processes in nature can select for antibiotic resistance and that can end up in a human pathogen," Harrison said.

Other MRSA lineages the researchers studied originated around the time penicillin was introduced, suggesting that our use of antibiotics was a selective pressure for the resistance in those cases.

William Keevil, a professor of environmental health care at the University of Southampton who was not involved in the study, welcomed the new research.

"I believe it to be an important study and another example of the evolutionary war and adaptation of environmental bacteria to survive in the presence of antibiotic-producing fungi, which has been occurring for hundreds of millions of years before the emergence of mammals and the antibiotic era," Keevil told Live Science in an email.

The findings were published Wednesday (Jan. 5) in the journal Nature.

Related content:

10 times nature stunned us in 2021

6 superbugs to watch out for

The 10 weirdest medical cases in the animal kingdom

This article was originally published by Live Science. Read the original article here.