Sunbathing is known to cause skin cancer – but it may also help people survive when they get it, scientists are reporting.

Two studies published yesterday showed that vitamin D produced by the action of the sun on the skin may help improve survival for patients with skin and bowel cancer.

The bizarre finding suggests that health warnings to avoid the sun have been too simplistic. Some exposure to the sun is necessary for health – it is excessive exposure leading to burning of the skin that does the damage.

Download the new Independent Premium app Sharing the full story, not just the headlines

A research team from the University of Leeds working with the US National Institutes of Health found a high level of vitamin D – suggestive of high sun exposure – protected patients with malignant melanoma, the deadliest form of skin cancer.

Those with the lowest levels of the vitamin D in their blood at the time of diagnosis were 30 per cent more likely to suffer a recurrence of the disease after treatment than those who had the highest levels.

Patients with the highest levels of the vitamin also had the thinnest tumours at diagnosis. Results of the study, funded by Cancer Research UK and the NIH, are published in the Journal of the National Cancer Institute.

The findings add to the growing body of evidence that boosting levels of vitamin D could protect against a wide range of diseases, or extend survival with them. The gloomy weather and long winter in countries north of 30 degrees latitude, such as the UK, means that a large part of the earth's population is deficient in the vitamin between October and March. The weight of evidence has grown so dramatically that governments around the world are reviewing their recommendations on the minimum recommended limits.

Professor Julia Newton Bishop, of the Leeds Institute of Molecular Medicine, who led the melanoma study, said: "It is common for people to have low levels of vitamin D in many countries. Melanoma patients tend to avoid the sun as sunburn is known to increase the risk of the disease.

"Our results suggest that melanoma patients may need to get vitamin D by eating fatty fish or by taking supplements to ensure they have normal levels."

Professor Newton Bishop warned against excessive use of vitamin D supplements, however. "There is some evidence from other studies that high levels of vitamin D are also harmful. So we should aim for a normal level rather than a very high one."

In the second study, researchers led by Professor Kimmie Ng, from the Dana-Farber Cancer Institute in Boston, US, who followed more than 1,000 bowel cancer patients for nine years, found those with the highest level of vitamin D were half as likely to die from the disease compared with those with the lowest levels. The results are published in the British Journal of Cancer.

Sara Hiom, director of health information at Cancer Research UK, which funded the study, said: "The key is to get the right balance between the amount of time spent in the sun and the levels of vitamin D needed for good health.

"Protection from burning in the sun is still vital. People with lots of moles, red hair, fair skin and a family history of the disease should take extra care as they are more at risk."

Vitamin D: Man-made healer

Vitamin D is the only vitamin that humans make themselves and is essential for the health of skin and bones. It has attracted increasing attention in recent years as its role in preventing cancer and other conditions including heart disease, diabetes and multiple sclerosis, has been revealed. Some experts believe the benefits of the Mediterranean diet may have as much to do with sun as with the regional food. An increasing body of cancer and other medical experts say a healthy intake of vitamin D for people in the UK and northern Europe should be five to 10 times higher than the current recommended blood levels of 200 to 600 International Units a day, depending on age. Others have suggested high levels may not be protective, and could even be dangerous.