When the bacteria in your gut run out of fiber, they might start snacking on your own intestines. That's the unsettling finding from researchers at Princeton University, who discovered that gut microbes turn to the gut's protective mucus lining when they don't get enough fiber from food. The good news? Certain plant proteins can step in to save the day.

Scientists have known for years that fiber is important for gut health, but this new research reveals exactly why. A team led by Jenna AbuSalim and Joshua Rabinowitz at Princeton found that when gut bacteria feast on fiber, they produce beneficial compounds that support healthy digestion and a healthy weight. But without fiber, the bacteria instead feast on the gut's own protective mucus layer, creating harmful compounds linked to cancer and kidney disease.

The researchers studied something they call "Prif" — short for "Proteins Imitating Fiber." These are plant proteins that the human body can't digest, but gut bacteria can. Like fiber, Prif gives bacteria something to eat other than the gut lining. The team found that both fiber and Prif shift the balance of certain compounds in the gut from harmful to helpful.

Specifically, the Princeton team looked at compounds called phenols. When gut bacteria digest the amino acid phenylalanine, they produce phenols associated with good health. But when they digest a similar amino acid called tyrosine, they produce phenols linked to worse outcomes in cancer patients and toxic effects in people with kidney disease.

"Our studies showed that both the fiber and indigestible proteins from plants shift the balance of phenol metabolites from the harmful kind made from tyrosine to the healthful variety derived from phenylalanine," AbuSalim explained.

The research, published in the journal PNAS and in Nature Metabolism, also found that some compounds previously credited entirely to gut bacteria can actually be produced by human metabolism too. This discovery could reshape how scientists develop treatments targeting these compounds.

Rabinowitz sees practical applications on the horizon. "Food packaging may eventually list Prif right below fiber," he said. He added that understanding how diet controls gut bacteria could lead to new therapies for a wide range of conditions, from digestive disorders to cancer.

For now, the message is simple: eating more plants — with their fiber and their helpful indigestible proteins — gives your gut bacteria exactly what they need to work in your favor instead of against you.