Exposure to UV light from the Sun or from tanning beds can damage the DNA in melanocytes, the cells that make the melanin that gives skin its colour.
In the past, experts believed that melanin protected the skin by blocking harmful UV light.
But there was also evidence from studies suggesting that melanin was associated with skin cell damage.
In the current study, Douglas E Brash, clinical professor of therapeutic radiology and dermatology at the Yale School of Medicine at Yale University, and his co-authors first exposed mouse and human melanocyte cells to radiation from a UV lamp.
More From This Section
To the researchers' surprise, the melanocytes not only generated CPDs immediately but continued to do so hours after UV exposure ended. Cells without melanin generated CPDs only during the UV exposure.
This finding showed that melanin had both carcinogenic and protective effects.
"If you look inside adult skin, melanin does protect against CPDs. It does act as a shield. But it is doing both good and bad things," said Brash.
In searching for an explanation of these results, Sanjay Premi, associate research scientist in the Brash laboratory, discovered that the UV light activated two enzymes that combined to "excite" an electron in melanin.
The energy generated from this process - known as chemiexcitation - was transferred to DNA in the dark, creating the same DNA damage that sunlight caused in daytime. Chemiexcitation has previously been seen only in lower plants and animals.
The study was published in the journal Science.