Whales have their own version of sunscreen, but it might not work as well as it used to.

The large marine mammals that spend up to six hours on the ocean’s surface protect themselves from the sun’s harmful ways by tanning, according to a new study published in the journal Scientific Reports.

"Most people think that whales can't get sunburned because of their dark skins," study author Karina Acevedo-Whitehouse, from the Institute of Zoology in London, said. "But in the last decade, there have been increasing reports about skin lesions on whales and dolphins."

Researchers collected more than a hundred skin biopsies from blue, fin and sperm whales in the Gulf of California between 2007 to 2009 using crossbows with modified arrowheads to take skin plugs, National Geographic reports.

"We found molecular evidence that blue whales increase production of melanin, so this would indicate that they tan," Acevedo-Whitehouse said, referring to blue whales.

While blue whales tanned, sperm whales increased production of repair genes to protect their cells from UV-ray damage, study co-author Mark Birch-Machin, a professor of molecular dermatology at Newcastle University in the United Kingdom, said. Fin whales were protected from sun damage altogether from their high melanin levels.

Scientists say that over the three-year research period, the number of blue whales with blisters caused by sun exposure increased by 56 percent, which may have been caused by ozone depletion.

The study is the first to show from DNA analysis and skin that, like humans, animals rely on pigments for sun protection.

"The whales are being hammered by UV rays every day, every time they surface," Acevedo-Whitehouse said. "The big question now is whether their cellular-repair mechanisms are being exceeded," which could lead to health problems including cancer – although skin cancer has yet to be identified on whale skin samples.

“We need to investigate further what is happening,” Birch-Machin said in a statement. “These whales occupy the same area year after year, so it is increasingly possible to understand the status of their populations, and what may be going on around them and in the environment. They are a reminder that changing climatic conditions are affecting every creature on the planet.”