Basking in the sunshine may help to slow the onset of obesity and diabetes, according to a new study.

Albeit, the researchers demonstrated this correlation in mice, but it's possible it could have the same effect on people, pending future research.

Scientists from the University of Edinburgh found that shining UV light at overfed mice slowed their weight gain. The critters also displayed fewer of the warning signs linked to diabetes, such as abnormal glucose levels and resistance to insulin.

You might assume that these beneficial effects are the result of Vitamin D, also known as the sunshine vitamin, but in actuality they were linked to a compound called nitric oxide, which is released by the skin after exposure to sunlight. Applying a cream containing nitric oxide to the skin of the overfed mice had the same effect of curbing weight gain as exposure to UV light, the team found.

Previous studies in people have shown that nitric oxide can lower blood pressure after exposure to UV lamps.

"These observations further indicate that the amounts of nitric oxide released from the skin may have beneficial effects not only on heart and blood vessels but also on the way our body regulates metabolism," researcher Dr. Martin Feelisch said in a statement.

However, researchers note that the way humans and mice absorb sunshine is completely different. Mice are nocturnal animals covered in fur and not usually exposed to much sunlight. But although the results should be interpreted cautiously, they add to the growing body of evidence that sun-seekers may be better off than those that hide in the shade.

"Our findings are important as they suggest that casual skin exposure to sunlight, together with plenty of exercise and a healthy diet, may help prevent the development of obesity in children," said lead author Dr. Shelley Gorman.

Dr. Richard Weller from the University of Edinburgh added: "We need to remember that skin cancer is not the only disease that can kill us and should perhaps balance our advice on sun exposure."

The findings were published in the journal Diabetes.