A few new studies also suggest that you may want to break up with your SPF.

We’ve talked about the dangers of low vitamin D—and the best ways to get enough through food, sunshine, and supplements. Low levels of vitamin D are tied to some pretty serious health conditions, such as obesity, cancer, diabetes, and heart disease. Vitamin D is also critical for calcium absorption and bone health, and low levels can lead to osteoporosis.

But here’s the tricky part. It’s really hard to get enough vitamin D from diet alone. And since most of us lead sedentary lives and have indoor jobs (read: we’re not outside basking in the sun every day), pretty much no one is getting enough of this crucial vitamin.

But, as a fascinating new article in Outside recounts, one group of researchers are finding sun exposure may actually be the best way to prevent vitamin D-related chronic diseases. As for the white stuff we’re slathering on, and the vitamin D supplements we’re taking? Well, they may not be doing much for our health at all.

In November, research funded by the NIH was published in the New England Journal of Medicine. The placebo-controlled study followed 25,871 people—divvied up into male patients over the age of 50 and female patients over 55 with varying skin colors—to measure the prevention of cancer, heart disease and stroke over five years. The researchers divided the group and administered vitamin D supplements to one half and placebo pills to the other.

The result? Researchers discovered that vitamin D supplements didn’t provide any lower incidence of cancer or cardiovascular events than the placebo.

Dr. Richard Weller, an academic dermatologist at the University of London, believes what makes people with high vitamin D levels so healthy isn’t the vitamin itself; it’s the exposure they’re getting from the sun. In 2010, Weller started researching nitric oxide—a molecule that helps dilate our blood vessels and lowers blood pressure—and he found that our skin actually uses the sun’s rays to produce nitric oxide. This evidence begs the question: Could sunlight exposure help lower blood pressure? Weller conducted an experiment to find out.

When Weller exposed volunteers to the equivalent to 30 minutes of summer sunlight without sunscreen, their nitric oxide levels went up and their blood pressure went down. These findings are far from insignificant—1 in 3 people in America have high blood pressure, and it’s the leading cause of heart disease-related deaths. So if the sun helps lower blood pressure, why wouldn’t people be basking in its rays? The answer, it turns out, is somewhat of a catch 22.

Most of us have been advised to stay out of the sun and cover ourselves in SPF to reduce our skin cancer risk. The American Academy of Dermatology has a firm stance on getting vitamin D from the sun or tanning beds. Their statement reads: “The American Academy of Dermatology recommends that all people, regardless of skin color, protect themselves from the sun’s harmful ultraviolet rays by seeking shade, wearing protective clothing, and using a broad-spectrum, water-resistant sunscreen with an SPF of 30 or higher.”

More on skin health:

Even though we’ve been ingrained by dermatologists, beauty experts, and our moms to wear sunscreen, avoiding the sun may actually prove to be more harmful than soaking up the rays. Deaths related to skin cancer are much lower than heart disease-related deaths. In the U.S., about 3 people out of every 100,000 die of skin cancer while over 100 die from cardiovascular disease.

To be clear: We’re not downplaying skin cancer, and melanoma in particular is no joke. Though it may only account for 1 percent of skin cancers, it causes a huge majority of cancer-related deaths, according to the American Cancer Society.

But there are several types of skin cancer clumped under this catch-all label. The most common types are basal-cell carcinomas and squamous-cell carcinomas, which are rarely fatal. Dr. Weller told Outside, “When I diagnose a basal-cell skin cancer in a patient, the first thing I say is congratulations, because you’re walking out of my office with a longer life expectancy than when you walked in.” That’s because carcinomas are strongly linked to sun exposure, and Dr. Weller believes these patients are reaping the benefits of sunshine and ultimately leading healthier lives.

Dr. Weller said that melanoma may not be as directly related to the sun as we once thought. “The risk factor for melanoma appears to be intermittent sunshine and sunburn, especially when you’re young,” Weller said. “But there’s evidence that long-term sun exposure associates with less melanoma.”

Dr. Weller’s research isn’t the only one that connects sun exposure to significant health benefits. Pelle Lindqvist, a senior research fellow at Sweden’s Karolinska Institute, tracked the sunbathing habits of nearly 30,000 women in Sweden over two decades. Lindqvist was originally studying blood clots, which were less prevalent in women who spent more time in the sun—and occurred less frequently during the summer. Next, he looked at the connection between sun exposure and diabetes. And, you guessed it, sunbathers had much lower rates.

They did, however, have higher rates of melanoma—but interestingly enough, were eight times less likely to die from it.

Over the 20-year study, Lindqvist found that participants who avoided the sun were twice as likely to die than those who were frequently exposed to it. Lindqvist’s team said in a 2016 study, “Avoidance of sun exposure is a risk factor of a similar magnitude as smoking, in terms of life expectancy.”

The bottom line: Thanks to such compelling evidence, I’ll be making a more conscious effort to bask in the sunshine a few times a week. However, one thing all dermatological researchers can still agree on is avoiding sunburn at all costs—a few minutes a day won’t hurt you, but slather on the sunscreen if you start to feel the burn.