Last month the Food and Drug Administration sent out an emergency alert: Two people who had undergone fecal transplants developed multi-drug-resistant infections from bacteria in the stool they were given, and one died.

The death and illness may be the first serious adverse events associated with the poopy procedure, out of tens of thou­sands of times it's believed to have been performed in the US. If those numbers are accurate, that’s an awfully good safety record. But it’s hard to know for sure, because roughly a decade since the procedure became mainstream, it still occupies a legal gray area, and thus whatever data is being collected isn’t comprehensive or public.

Maryn McKenna (@marynmck) is an Ideas contributor for WIRED, a senior fellow at the Schuster Institute for Investigative Journalism at Brandeis University, and author of Big Chicken.

That iffy legality is what is worrying the patients and doctors who practice the procedure now. The FDA has allowed fecal transplants to take place, even though they’re not an approved procedure, because they work extraordinarily well—and because, to this point, there were no bad consequences to make the agency rethink its permissiveness. Now that there’s been a death, the agency might have to reconsider, and one consequence could be that a still-grassroots procedure based on donations moves into the realm of pharma companies, intellectual property, and much higher costs.

There’s a lot to unpack here, so start with the obvious: A fecal transplant is just what it sounds like: inserting actual feces produced by a healthy person into the digestive system of a sick individual, to repopulate a gut that has an out-of-balance microbiome with a rich mixture of bacteria. (You can start from either end, by swallowing capsules or using a scope or enema.)

The main reason to do that is to cure a devastating, diarrhea-causing infection by Clostridioides difficile, the bacterium usually known as C. diff (and formerly called Clostridium difficile). C. diff infection is a side effect of other medical treatment; it occurs when a patient takes a course of broad-spectrum antibiotics that wipes out the multiplicity of bacteria living in the gut, leaving room for C. diff to burgeon. The standard medical response is stronger antibiotics—but in about one in five patients that makes the problem worse, leading to a worsening spiral of recurring diarrhea and stronger antibiotics, in which every recurrence ups the odds that it will happen again. C. diff infections occur more than 500,000 times a year in the US, causing some 30,000 deaths a year and leaving survivors homebound and frail.

Fecal transplants—some researchers call them FMTs, for fecal microbiota transplants—may have a long history: There’s a mention of “yellow soup” in an ancient Chinese medical text that might be discussing them. In the modern medical record they date to 1958, when a surgeon in Denver admitted to using them to help four patients recover from “pseudomembranous colitis,” a life-threatening syndrome that’s now recognized as arising from C. diff. They seem to have taken off in the US sometime in the 2000s, as a procedure performed in medical offices by some gastro­enterologists, and also by some patients in their homes—just a few years after a “hypervirulent” strain of C. diff arrived in the country.

There’s no question that the transplants work. They achieve a cure in something like 90 percent of C. diff cases, a far higher rate than for antibiotics. In fact, one study comparing them to antibiotics was stopped early, because the patients getting the transplants did so much better that it was unethical to continue. They work so well that specialty medical societies have agreed they are equivalent to drugs for recurrent C. diff, with some physicians saying that transplants should become the main treatment for the condition. Researchers also are looking into transplants for inflammatory bowel disease, irritable bowel syndrome, and a range of other problems that microbiome tinkering might affect.

That’s the history. Here’s the problem: Fecal transplants are inarguably a treatment, and the FDA regulates treatments. But treatments have always been devices or drugs, and feces are neither. In complexity, they’re closest to donated tissue, analogous to a ligament or a cornea. That makes them an awkward fit for the FDA’s regulatory pathways.

SUBSCRIBE Subscribe to WIRED and stay smart with more of your favorite Ideas writers.

Over the years, the FDA has moved from exerting strict control on the procedure as an “investigational new drug” to giving experimenters some latitude, and more recently, tight­ening enforcement once again. In parallel with those changes, the procedure itself matured, going from patients and family bringing in their own bags of poop to the establish­ment of stool banks—analogous to blood banks—that recruit donors and screen them and their donations for any health risks. Some of those banks are maintained individually by universities, but the largest in the field is OpenBiome, an independent facility in Massachu­setts that says it has contributed material for 48,000 fecal transplants so far.