Vitamin D may be able to help the immune system fight melanoma, scientists believe.
Scientists from the University of Leeds found the vitamin influences the activity of a signalling pathway within the cells, which makes them behave less aggressively.
Reducing the activity of the pathway has the potential to enhance anti-tumour immunity and could lead to new ways to treat melanoma, they believe.
Scientists have previously known that lower levels of vitamin D are linked to worse outcomes for people with melanoma, but not the mechanism behind this.
The new study looked at what effect vitamin D has on the activity of cells, and what happens when there are a lack of vitamin D receptors (VDR), which enable vitamin D to bind to the cells' surface.
They found that human tumours with low levels of the VDR gene grew faster, and had a lower activity of genes that help the immune system fight cancer.
They also had a higher activity of genes linked to cancer growth and spread.
When they increased the VDR levels in mice, this reduced activity of the pathway and slowed down the growth of the cells.
It was also less likely to spread to their lungs.
Julia Newton-Bishop, professor of dermatology at the University of Leeds, said: "This new puzzle piece will help us better understand how melanoma grows and spreads, and hopefully find new targets to control it.
"But what's really intriguing is that we can now see how vitamin D might help the immune system fight cancer.
"We know when the Wnt/beta-catenin pathway is active in melanoma, it can dampen down the immune response, causing fewer immune cells to reach the inside of the tumour, where they could potentially fight the cancer better.
"Although vitamin D on its own won't treat cancer, we could take insights from the way it works to boost the effects of immunotherapy, which uses the immune system to find and attack cancer cells."
The study is published in the journal Cancer Research.