Two years ago, Catherine Duff, then 57, tearfully described eight debilitating bouts of antibiotic-resistant Clostridium difficile infection to a government panel in Washington. She grew better, she said, only after treating the gastrointestinal infection at home with her husband’s feces, a blender and an enema bag.

Mark B. Smith, a young doctoral student in microbiology, was in the audience, almost as teary as Ms. Duff. Resolving to help patients like her, he started a nonprofit called OpenBiome, the first stool bank in the country, which distributes fecal samples from healthy donors to help cure people with tenacious C. difficile infections.

Now OpenBiome has made the process, called fecal microbiota transplantation, far simpler. The bank has come up with a capsule containing fecal microbes that can be taken much like any other drug — poop in a pill.

“It’s such an obvious improvement,” Dr. Smith said.

C. difficile resides among trillions of other bacteria in normal, healthy humans. When antibiotics wipe out the competition, the bacteria spread through the gut, producing toxins and causing persistent diarrhea. The disease afflicts an estimated 450,000 Americans annually, killing 15,000. Most pick up the infection in hospitals and nursing homes.