For many years, bacteria has gotten a bad rap.

But doctors are learning that many forms of bacteria in the gut aren’t harmful.

In fact, they help maintain health and could eventually play a role in cutting rates of diabetes and obesity.

“They live in us and do good for us, and we allow them to live in our system and we are good for them,” said Heli Roy, an assistant professor at the Pennington Biomedical Research Center. “It works both ways.”

The average person has 3 pounds of bacteria on the skin and in the mouth and intestinal tract. While there are many bad forms of bacteria, the body needs a lot of the good kind.

“Pretty much all of your body has specific bacteria in it,” Roy said. “Obviously we want that because it helps us stay healthy.”

Over the past 15 years, researchers have become more interested in the positive role bacteria play in the gut, Roy said. They have learned that these helpful microorganisms provide a barrier for harmful substances we might ingest and can change other dangerous compounds so they are flushed out in waste, she said.

“Whatever harmful substances we might have, they actually get rid of them,” Roy said.

Some bacteria can help prevent colon cancer. When they digest fiber, these bacteria form a type of energy needed by colon cells.

Bacteria grab the most headlines in relation to obesity. Researchers are finding that lean people and obese people often have different bacteria in their guts.

One study switched the gut bacteria of a lean mouse with the gut bacteria of an obese mouse. The two mice switched body compositions.

Now that science has established the need for good bacteria in the body, how do you encourage it?

Roy, a nutrition specialist, provided a few tips:

Consume probiotics. Probiotics are living microorganisms we consume in food, supplements, drinks and drugs. They’re commonly found in yogurt, some types of smelly cheese, traditional sauerkraut and many other aged and fermented foods. Almost any type of yogurt is good, Roy said, but sauerkraut containing vinegar does not contain helpful microorganisms.

Probiotics last less than a day in the acid of the stomach, but live a few weeks in the intestines, so Roy advises eating yogurt or other probiotic foods about twice a week.

“You want to consume probiotics regularly,” she said. “They don’t live in your stomach forever.”

Eat fiber and avoid lots of fat. A high-fiber diet encourages bacteria to grow in the intestinal tract, Roy said. “Americans tend not to consume enough fiber,” she said. “That would be your whole grains, your brown rice, your oatmeal.”

High amounts of fat and alcohol in the diet can kill probiotics.

Avoid probiotic supplements. Probiotics do come in pill form, but Roy doesn’t recommend them. They’re expensive, she said, and it’s unclear how effective they are over a long period.

“These bacteria, how long can they sit and be viable if they’re on these drug store shelves?” she questioned.

You can’t get too much good bacteria. The only way consuming probiotics can be harmful to your diet is if you completely avoid all other foods and limit your nutrient intake.

“Anything within reason is great,” Roy said.