If you happen to be frolicking around in some tropical waters at some point in the future, you may have the marine life circling your feet to thank for keeping your shoulders from roasting. Scientists have uncovered a technique used by zebrafish and various other animals to create their own sunscreen and recreated it in the lab. They say the method could one day be used to produce sunscreen and other pharmaceuticals for humans.

A chemical called gadusol has been discovered in a range of marine life in the past, including sea urchin eggs, cod roe and freshly hatched brine shrimp. This compound is of particular interest to researchers as it serves to protect animals from UV rays, though it was thought that they can only acquire the chemical through their food or bacteria.

The team of researchers from Oregon State University made the new discovery while investigating compounds similar to gadusol used to treat diabetes and fungal infections. They had thought that a particular biosynthetic enzyme common in these different chemicals was found only in bacteria, but their research suggested that it was also present in fish, which combined it with another protein to produce gadusol. They were then able to recreate this process by transferring the fish's genes to yeast.

"In the future it may be possible to use yeast to produce large quantities of this natural compound for sunscreen pills and lotions, as well as for other cosmetics sold at your local supermarket or pharmacy," says Professor Taifo Mahmud, lead author of the study.

This isn't the first time scientists have peered underneath the ocean's surface for ways to better protect ourselves from the sun. In 2011, researchers discovered that coral produces a natural compound that blocks UV rays. More discoveries followed in 2013, raising the possibility of marine-inspired sun lotions that protect against a wider band of ultraviolet light.

Mahmud says that sun care solutions based on gadusol may even be ingested, rather than a cream or lotion that needs to be rubbed and absorbed into the skin. Further to UV protection, it could also play a role in stress responses and embryonic development as an antioxidant.

The findings were published in today in eLife.