The vitamin was found in tumour tissue
Upping vitamin D levels may help to ward off breast cancer, research has found.
Scientists at Birmingham University and St George's Hospital, London, found breast tissue contains an enzyme that activates vitamin D.
Levels of the enzyme were elevated in breast tumours - suggesting the vitamin is produced to try to combat the spread of cancer.
The research was presented at a meeting of the British Endocrine Societies.
Previously it was thought that the active form of vitamin D - calcitriol, which is a potent anti-cancer agent, was only made in the kidney.
The researchers think having a local cancer-fighting 'factory' is part of the breast's natural immune response to a tumour.
And they suggest that the rise in breast cancer rates in the UK may be linked to the fact that we have low levels of vitamin D in our bodies.
Exposure to sunlight is the greatest source of vitamin D and population studies have previously suggested higher vitamin levels may contribute to the lower incidence of breast cancer seen in sunny climates such as the Mediterranean.
Lead researcher Dr Martin Hewison said: "Our work shows that the breast has its own local 'factory' for generating the anti-cancer form of vitamin D.
"Unfortunately women who live in cloudy countries like the UK may not have enough of the raw material, vitamin D, to fuel this factory.
"Exposure to sunlight is the most efficient way of generating vitamin D in our bodies, but we all know of the dangers of sunbathing.
"Perhaps now it's time to look at improving our dietary intake through fortification of more foods with Vitamin D."
Delyth Morgan, of the charity Breakthrough Breast Cancer, said previous research had also suggested that vitamin D may help prevent and treat some cancers, including breast cancer.
However, she said the effect had yet to be confirmed in human trials.
"Further research is needed before any firm conclusions about the role of vitamin D in breast cancer prevention can be established."
Vitamin D is generated by exposing the skin to sunlight. It is also found in dairy products, fish oils and breakfast cereals.
However, too much vitamin D is thought to disrupt the body's phosphate and calcium levels.
The UK Food Standards Agency recommends a daily allowance of 5 micrograms.