The idea of swallowing a so-called “poop pill” may be a turn off, but it’s not as gross as it sounds, and it’s a medical breakthrough that could help the thousands of people who suffer from the deadly gut infection brought on by the bacterium Clostridium difficile (C. difficile).

“At first I thought it was kind of nasty, and a little gross,” Shawn Mulligan, of Calgary, Canada, who suffered from C. difficile infection, told NBC. “But at that point, I would have done anything.”

C. difficile was recently named among the top three public health threats by the Centers for Disease Control and Prevention (CDC) because of their resistance to antibiotics — the CDC estimates that C. difficile causes at least 14,000 deaths each year. In its mild form, those who become infected are susceptible to frequent diarrhea and abdominal cramps. But when it’s severe, they can also have fever, nausea, dehydration, a swollen abdomen, and kidney failure, according to Mayo Clinic.

“It lasted for two years. It was horrible. I thought I was dying. I couldn’t eat. Every time I ate anything or drank water I was in the bathroom,” Margaret Corbin, who was treated with the pills, told the AP. “I never went anywhere, I stayed home all the time.”

Dr. Thomas Louie, of the University of Calgary, and his team reported at IDWeek 2013, a meeting for infectious disease experts, that they cleaned out fresh donor stool — usually from a family member — until only the good bacteria was left, and then put the stool in triple-coated capsules, which wouldn’t dissolve until they reached the intestines. For the 27 patients who had at least recurrences of C. difficile infection, the good bacteria was able to repopulate their intestines and fight of the infection.

In order for it to work, they were given an antibiotic that killed off the C. difficile a few days before treatment. They then underwent an enema on the day of the treatment so that the good bacteria would go in having “a clean slate,” Dr. Louie told the AP. Once they did this, they swallowed between 24 and 34 capsules in one sitting. After treatment, none of the patients had a recurrence.

“The approach that Dr. Louie has is completely novel — no one else has done this,” Dr. Curtis Donskey, of the Cleveland Veterans Affairs Medical Center, told the AP. “I am optimistic that this type of preparation will make these procedures much easier for patients and for physicians.”

Dr. Louie’s method bypasses the expense and invasive aspects of other fecal transplantation therapies, which usually involve colonoscopies or throat tubes. The pills allow an easier way to undergo treatment for patients who weren’t able to tolerate other treatments.

“I was sitting down by myself and saying, what if it were me?” Dr. Louie told NBC. “I thought, ‘If you could give it to me by pills.”