There may be an upside to skin cancer, after all. According to a new study published today in Neurology, people who have skin cancer are less likely to develop Alzheimer's disease.

Researchers at the Albert Einstein College of Medicine in New York studied 1,102 people with an average age of 79, and followed them for an average of 3.7 years. None of the participants had dementia when the study began, according to a press release from the American Academy of Neurology. At the beginning of the study, 109 people reported they had developed skin cancer in the past. During the study, 32 people developed skin cancer and 126 people developed dementia, 100 of those being Alzheimer's dementia.

Of the 141 people who previously had skin cancer or who developed skin cancer during the study, the researchers found only two of them developed Alzheimer's. Although the link between skin cancer and Alzheimer's is not yet known, study author Richard Lipton said in the statement that one possible explanation is that physical activity is known to protect against dementia, and outdoor physical activity increases a person's exposure to UV radiation and therefore to skin cancer. However, he added, biological factors like genetics must play some role in the association, as physical activity alone doesn't reduce the risk of Alzheimer's to the extent found in this study.

The link did not apply to melanoma, a less common and more aggressive form of skin cancer.

This doesn't mean people should run out in the sun with no sunscreen, hoping to develop skin cancer, Lipton said. "People should continue to wear sunscreen, avoid the sun during midday and wear clothing to protect their skin. The hope is that these results help us learn more about how Alzheimer's develops so we can create better preventive methods and treatments," he added.

Source: RS White, RB Lipton, CB Hall, JR Steinerman. Nonmelanoma Skin Cancer is Associated With Reduced Alzheimer's Disease Risk. Neurology. 2013.