A diarrhea-causing bacterium is evolving into a new species, one that thrives on your sugar-rich Western diet, according to a new study.

The Clostridium difficile bacteria produce spores that spread through contact with feces, and so can commonly be found in bathrooms or on surfaces that people touch without properly washing their hands. What's more, this bacterium is becoming increasingly resistant to disinfectants used in hospitals, said study lead author Nitin Kumar, a senior bioinformatician at the Wellcome Trust Sanger Institute.

Patients taking antibiotics face the greatest risk of developing diarrhea from C. difficile, because antibiotics clear away healthy gut bacteria that typically fight off the infection, Kumar told Live Science.

In the new study, Kumar and his team collected 906 different strains of C. difficile from the environment, from humans and from animals such as dogs, pigs and horses. The researchers analyzed and compared the DNA for these various strains and found that C. difficile was evolving into two separate species.

Related: 5 Ways Gut Bacteria Affect Your Health

In order to be considered the same species, two groups of organisms have to share 95% of their genomes, and the two emerging species of C. difficile share 94% to 95%, Kumar said. That indicates that "they are on the verge of speciation."

It's not uncommon for bacteria to evolve, but "this time, we actually see what factors are responsible for the evolution ," Kumar said.

One of the emerging species, C. difficile clade A, is the one that is thriving in hospitals. The team found that it made up 70% of the samples collected from hospital patients. DNA analysis suggested that this emerging species started evolving 76,000 years ago and eventually gathered mutations in its genes that better allowed it to metabolize sugars and form disinfectant-resistant spores.

The researchers then introduced the C. difficile clade A bacteria to mice that were eating various diets. Results showed that the bacteria were more likely to thrive and colonize the gut when the mice ate diets rich in simple sugars, such as glucose and fructose.

Essentially, our diet and other lifestyle factors, like the type of disinfectant commonly used in hospitals, are helping this bacteria to evolve more effectively, Kumar said. These results suggest that it might be useful to consider a "low-sugar diet for those patients who are infected with C. difficile clade A or [for hospitals to] look for new disinfectants as well."

The findings were published Aug. 12 in the journal Nature Genetics .