It is the bitterest of ironies that a snake which spends its entire life at sea, constantly submerged in water, should spend months on end being thirsty and dehydrated.

Fresh water quenches thirst. Salt water worsens it. If you drink seawater, your kidneys try to get rid of the excess salt by diluting it in urine, and you expel more water than you take in. The same applies to other land animals, and those that return to the sea have special adaptations for coping with salt. Many sea animals avoid swallowing seawater entirely, and get fresh water from the food they eat. Turtles, sea birds and marine iguanas have special glands for getting rid of salt.

Sea snakes have similar glands under their tongues. When Harvey Lillywhite from the University of Florida started studying these serpents a few decades ago, all the textbooks said that they used these glands to get rid of salt.

But that explanation didn’t add up. For a start, Lillywhite found it very hard to keep one of these gland-bearing species in full seawater—they would often become very dehydrated. Later, he discovered that three species of sea kraits refuse to drink seawater even when they become dehydrated. In the lab, they always choose fresh water. In the wild, they tend to stick close to sources of fresh water, like springs or rainy spots. It looked like their ability to process salt was a myth.

Sea kraits are well adapted for life in the ocean, but they return to land to lay their eggs. The yellow-bellied sea snake, however, is completely marine. This beautiful creature, with its black and yellow body and paddle tail, hunts at sea and gives birth to live young at sea. It’s the only species of sea snake to live in the open ocean. Surely, these snakes would have some way of coping with salt?

Lillywhite started studying this species in 2009, at a site off the coast of Costa Rica. “We’ve looked at hundreds,” he says. “No sea snake we’ve observed has drunk any seawater.”

They only stick to the fresh stuff, but the amount they drink varies throughout the year. These snakes live in a place that goes through drought from November to May. If they were captured during these dry spells, they betrayed their thirst by sipping heavily from fresh water; if they were caught in wetter months, they barely drank. “If the snake drinks fresh water, it’s thirsty,” says Lillywhite. “If it’s thirsty, it’s dehydrated, and if it’s dehydrated, it’s not doing what the textbooks said.”

The team also found that the snakes had significantly less water in their bodies than in the dry months than in the wet ones. Despite having a salt gland and being surrounded in water, the snakes are thirsty and dehydrated for months on end. Lillywhite thinks that they cope by having an unusually high amount of water in their bodies to begin with. They might also have adaptations that help them to lose water slowly, and to withstand the effects of dehydration.

In the wild, it is possible that the snakes use deep springs or estuaries, but they are incredibly widespread and Lillywhite has never found any evidence of them congregating in specific sites.

Instead, rain brings them salvation. When it falls over the ocean, it doesn’t mix with the seawater straight away. Instead, it forms a layer that is either fresh or only mildly salty. If the conditions are right, these “freshwater lenses” can be both deep and persistent. And the yellow-bellied sea snake, it seems, drinks from them.

Lillywhite thinks that it should be easy for them to find such lenses because they regularly surface to breathe. They might also be able to sense the changes in pressure that accompany a storm, and head for areas where rain is likely to fall. “When you scuba dive you can sort of tell when it’s raining,” he says. “I think the snakes can too.”

And if rain never falls, the snakes may not survive. Many sea snakes that were once abundant off the coast of Northern Australia have mysteriously started to vanish. Eight species are locally extinct. There are many possible causes, but Lillywhite notes that this part of Australia has recently suffered from a prolonged drought. Perhaps the lack of falling fresh water contributed to their downfall? Perhaps, surrounded by water, these sea snakes died of thirst.