The latest study suggests that the popular pain killer can inhibit melanoma.

In the largest investigation of its kind, published in the journal Cancer, researchers found that women who regularly take aspirin have a decreased risk of developing melanoma, and that the protection may be cumulative — the longer they take it, the lower their risk.

More than 61,000 people were diagnosed with skin cancer in the U.S. in 2009, the latest year for which statistics were collected by the Centers for Disease Control (CDC), and deaths from melanoma cost $3.5 billion in lost productivity each year. Despite greater awareness of the dangers of tanning, as well as the importance of protecting sun-exposed exposed skin with clothing or sunscreen, diagnoses of melanoma have inched upward by 2% each year between 2000 and 2009.

In the latest study, the researchers studied 59,806 women between ages 50 to 79 enrolled in the Women’s Health Initiative who were followed for around 12 years. The women answered questions about their medication use, diet and other lifestyle habits such as sun exposure. And even after controlling for skin cancer risk factors such as tanning and low use of sunscreen, the women who reported taking aspirin at least twice a week showed a 21% lower risk of melanoma than the women who didn’t take the pain killer. And the longer they stayed on aspirin, the lower their risk; women who used aspirin regularly for one to four years for example, showed an 11% lower risk of melanoma compared to those who didn’t take the pills for that time, while women who continued taking aspirin for five or more years enjoyed a 30% lower chance of developing melanoma.

How is the pain killer connected to cancer?

The explain could lie with inflammation, the potentially damaging reaction by the immune system to stresses, irritants and foreign intruders such as bacteria and viruses. Since aspirin works to reduce inflammation, it could help to quiet down the processes that can trigger cells to grow abnormally. The study isn’t the first to connect the anti-inflammatory effects of aspirin to a lower risk of developing melanoma, but it is the largest to see a significant pattern among pain killer users. In other studies, aspirin has been associated with a lower risk of other cancers, potentially for the same reason that curbing inflammation may also inhibit tumors. A study published last year linked aspirin and other pain relief drugs like ibuprofen, called nonsteroidal anti-inflammatory drugs (NSAIDs), to a 46% lower risk of colon, lung and prostate cancers. But the current study did not find a protective effect against melanoma for NSAIDs other than aspirin.

The findings are exciting for the cancer prevention, since aspirin is widely available and inexpensive. But because the study only compared past use to melanoma outcomes, the researchers say the next step in confirming the results would be to conduct a clinical study in which some participants take aspirin on a regular basis and others do not, to test whether the pain killer can prevent melanoma. Any benefits, they say, will have to be weighed against the risks of taking aspirin, which include stomach bleeding and clotting disorders.

“There’ve been about eight studies that have looked at melanoma, and about half of them find slightly lower risk and half find no connection at all. You look at the totality of the evidence, and right now it’s rather mixed,” Eric Jacobs, an epidemiologist at the American Cancer Society told NPR.

Until the data on aspirin and skin cancer is solidified, he and other cancer experts recommend avoiding tanning beds, using sunscreen with SPF above 15 and finding shade and covering up when in the sun in order to lower chances of developing skin cancer.