They aren't the most pleasant things to think about, but parasitic worms could help our bodies fend off autoimmune conditions such as inflammatory bowel disease (IBD) - a condition that affects around 1.4 million Americans. A new study suggests that some strategically placed worms could change the balance of bacteria inside our gut, overpowering the harmful species that cause inflammation.

It's further evidence for the idea that too much sterility and cleanliness could actually be bad for us. According to the hygiene hypothesis, which was first proposed in 1989, a limited amount of exposure to germs is beneficial to our immune systems, and can help us to fight off serious diseases. Parastic worms might just be the next logical step.

A team from New York University bred mice carrying genes associated with IBD and other immune conditions, then infected them with juvenile whipworms - a type of round worm that infects the small and large intestines.

When the worms matured, the mice were found to have reduced levels of Bacteroides bacteria (which cause inflammation) and increased levels of Clostridia bacteria (which help to reduce it).

As Kate Horowitz from MentalFloss reports, the researchers then extended their study to include 75 Orang Asli people from rural Malaysia known to have high rates of worm infection but low rates of IBD.

When compared with 20 people living in the urbanised capital, Kuala Lumpur, the rural dwellers were found to have much fewer Bacteroides in their system. Again, this could be the hygiene hypothesis at work.

"Our study could change how scientists and physicians think about treating IBD," said study investigator and microbiologist, Ken Cadwell, in a press statement. "Patient testimonials and anecdotes lead many to think that worms directly cure IBD, while in reality, they act on the gut bacteria thought to cause the disease."

The next step is to investigate exactly how Clostridia beat down Bacteroides, and to find harmless Clostridia species that can still provide the beneficial effect. The researchers also want to look more closely into the way that worm infections can alter our gut bacteria.

Eventually, this could lead to better treatments for other inflammatory diseases. Of course, parasitic worms (also known as helminths) can themselves cause several serious illnesses, so ideally we don't want to infect people as a cure for other ailments, though some people are taking their health into their own hands. Ultimately, scientists want the ability to replicate the good work these worms appear to do without the worms themselves.

"I got interested in the question of how worms could be beneficial when I was contacted by an individual who had deliberately infected himself with worms to treat his symptoms of IBD, and was able to put his disease into remission," said one of the team, P'ng Loke. "So we've been looking for a way to understand the mechanism behind how worms could be beneficial."

Further down the line, other autoimmune diseases - including multiple sclerosis, rheumatoid arthritis and type I diabetes - might also benefit from similar treatments, though there's still a lot of research needed to get there.

The findings of the study have been published in the journal Science.