If you live someplace with lots of sunny days, new research suggests you might be at a lower risk for having a stroke.

Leslie McClure, PhD, of the University of Alabama at Birmingham, says past research has shown a link between sunlight and cognitive impairment, a condition marked by greater-than-average age-related memory loss, so it made sense to see if there was a relationship between sunlight and strokes as well.

Her work involved more than 16,000 men and women in a long-term study that looked at racial and geographic differences in stroke risks. Volunteers filled out detailed questionnaires about where they’d lived throughout their lives, and then researchers used a program developed by NASA that takes into account clouds, smog, and other factors to calculate sunlight exposure based on latitude and longitude.

Every six months for five years, the study subjects were asked about their health. By the end of the study period, 351 people had suffered a stroke.

An overall analysis determined that the greater the sun exposure, the lower the stroke risk — and conversely, people who lived in areas where it was less sunny than average had a 60 percent higher risk.

McClure thinks the results might have something to do with vitamin D, since radiation from the sun is a main source of the body’s vitamin D and previous studies have linked the vitamin to heart and blood vessel health.

But American Stroke Association spokesperson Mark Alberts, MD, a neurologist at Northwestern University in Chicago, has another possible explanation: “People who live in gloomy, rainy areas may be less likely to exercise, and that may account for a higher stroke risk,” he told WebMD.

A second study suggests eating a lot of salmon, eggs, tuna, and other vitamin D-rich foods may help protect against stroke and memory loss, causing Dr. Alberts to conclude, “Getting a lot of vitamin D may be a marker for overall good health.”

Both studies were presented at the American Stroke Association’s International Stroke Conference 2012.