A new U.S. study released on Thursday has found an unexpected role for vitamin D3 — the ability to help protect the skin from infections.

Richard Gallo and colleagues from the University of California at San Diego found that wounding the skin triggers the production of an active form of D3.

That vitamin in turn can help boost the immune system to fight bacteria, the researchers said in Thursday's online issue of the Journal of Clinical Investigation. 

"Our study shows that skin wounds need vitamin D3 to protect against infection and begin the normal repair process," said Gallo in a release.

"A deficiency in active D3 may compromise the body's innate immune system which works to resist infection, making a patient more vulnerable to microbes."

D3 has already been shown to help fight infectious diseases such as tuberculosis.

The researchers said they found that injury stimulates certain skin cells to produce the antimicrobial chemical cathelicidin, which is needed to fight infection.

When production of vitamin D3 is stimulated, two genes that detect microbes become activated. Mice and humans that lack cathelicidin are more prone to infections.

African-Americans show lower concentrations of the vitamin, which could be related to their decreased ability to absorb vitamin D from sunlight.

The research was sponsored by the U.S. National Institutes of Health and the Veterans Administration.