Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Bacteria that normally thrive on healthy skin may not only keep “bad” bacteria at bay — they may also help prevent skin cancer, researchers reported Wednesday.

They found Staphylococcus epidermidis bacteria, a strain that lives harmlessly on human skin, produces a substance that stops tumors from growing.

Tests on mice showed that the molecule produced by the bacteria interferes with tumors but not normal skin cells.

"This unique strain of skin bacteria produces a chemical that kills several types of cancer cells but does not appear to be toxic to normal cells,” said Dr. Richard Gallo, who chairs the Department of Dermatology at the University of California San Diego School of Medicine.

"We showed activity against melanoma, squamous cell carcinoma and ultraviolet-induced precancerous lesions."

The team was simply looking for evidence that Staph epidermidis can kill off pathogenic bacteria, like group A strep.

They were working to expand proof that “good” bacteria can keep bad bacteria at bay. It’s long been known that the human microbiome, the collection of microbes that live in and on our bodies, are important for keeping us healthy.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

They help digest food, affect appetite, influence disease and may even control mood.

It’s also clear that having healthy populations of “good” bacteria can out-compete pathogens that cause disease. That’s why fecal transplants are being used to treat patients with Clostridium difficile infections, which can cause fatal chronic diarrhea.

They were testing various strains of Staphylococcus from human skin, and found one that killed group A strep, which cause a range of pesky infections from strep throat to cellulitis. They can take on a flesh-eating form, causing necrotizing fasciitis, also.

Whatever it was that the staph bacteria made, it was not a protein — the usual product that cells make and secrete, they reported in the journal Science Advances.

Instead, it was a molecule called 6-N-hydroxyaminopurine (6-HAP for short). It interferes with DNA polymerase activity and slowed the proliferation of tumor cells.

Maybe it stops skin cancer, they asked. So they tested mice, using a standard experiment to induce skin cancer in the animals.

Some mice had normal, run-of-the-mill S. epidermidis on their skin, while others were coated with S. epidermidis that produced 6-HAP.

Those coated with 6-HAP producing staph had many fewer tumors, Gallo’s team found.

It’s not a big surprise.

“Previous observations have reported that dysbiosis (a state of altered microbiome) may promote cancer. For example, observations associating bacteria in the gut with an increase in carcinogenesis suggested that this effect was dependent on inflammation,” they wrote.

The next step is to see if it might protect people against skin cancer.

“Further study is needed to examine whether a loss of S. epidermidis strains producing 6-HAP increases a risk of skin cancer in humans or could be used as a preventative treatment,” they wrote.

Gallo helped found a company called MatriSys Bioscience that is trying to develop bacteria as medical treatments for skin conditions.

Other teams have been working to develop bacteria into treatments for eczema and other skin conditions.

Gallo's team has been trying a lotion using two benign staph bacteria — Staphylococcus hominis and Staphylococcus epidermidis — to fight the effects of the harmful Staphylococcus aureus.