In a warmer world, the future could be entirely female for green sea turtles. These reptiles are born female if they’re exposed to warmer-than-usual temperatures while they’re embryos — and due to climate change, that’s what’s happening at the northern edge of the Great Barrier Reef, according to new research. Here, more than 99 percent of the younger sea turtles are now female.

But green sea turtles aren’t alone: for certain reptile and fish species, the outside temperature determines the sex of their offspring. That means that as global temperatures continue to climb, entire populations could wind up becoming all male or all female, which would make reproduction a challenge.

The phenomenon is called temperature-dependent sex determination, and scientists are still figuring out exactly how it works. For humans and other mammals, genes determine the sex we’re born with: biological females are born with two X chromosomes, and males are born with an X and a Y chromosomes. For many reptiles and some fish, temperature is thought to turn on or off a genetic switch that sends an embryo down the pathway of becoming a biological female or a biological male.

For example, when green sea turtle eggs incubate at a comfortable 84.7 degrees Fahrenheit (29.3 degrees Celsius), roughly equal numbers of male and female turtles hatch. But if it gets too toasty, entire clutches can become female. “It’s really kind of a cool system,” says Fredric Janzen, an evolutionary ecologist at Iowa State University. “It’s a really sharp drop-off over the span of a couple of degrees. And bam! You’re all one sex, or you’re all the other.”

But if climate change skews sex ratios for future generations, these species could go extinct if they don’t find a way to adapt. Here’s a look at some of the animals whose sex lives could be wrecked by global warming.

Turtles and Tortoises

Like green sea turtles, warm temperatures cause more females than males to hatch for many turtle and tortoise species. That includes the critically endangered Hawksbill sea turtle, a beaky sea turtle that prefers the shallow waters of the Atlantic, Pacific, and Indian oceans. Scientists studying the young Hawksbill turtles swimming in the coral reefs off of Florida found more than twice as many females as males, a ratio that could climb with rising global temperatures. “In a worst-case scenario, global warming could lead to the elimination of male offspring production altogether,” the researchers wrote in 2007.

Climate change can also mess with turtle sex ratios in unexpected ways — like, for example, with the red-eared slider, a turtle native to a middle chunk of the US stretching from the Gulf Coast almost to Lake Michigan. Warm temperatures should skew red-eared slider clutches female — but in Illinois, the number of young males is rising. Researchers from the Southern Illinois Natural History Survey suspect that could be because climate change has lengthened the nesting season, allowing females to lay their eggs when it’s cold out. Those cooler nests produce more males, causing a boost in the male red-eared slider population despite global warming.

Lizards

On the Australian island of Tasmania, there’s a small lizard called the snow skink that lives in rocky areas from coastal to highland regions, and gives birth to live young. Two different mechanisms determine the sex of this lizard’s offspring: for the coastal snow skinks, it’s outside temperatures, with cooler years producing more males. But at higher elevations, genes determine if a baby snow skink is born male or female. That might have developed because temperature fluctuations are too extreme at higher elevations, causing birth ratios to skew. That means that the highland population has adapted to climatic extremes — something the low-lying population might have to develop as well if it wants to survive as the world warms.

Tuataras

While warmer temperatures usually mean more female hatchlings for reptiles, a key exception is the tuatara (Sphenodon punctatus), an iguana-looking creature that lives on the small islands off of New Zealand. These spiny reptiles can grow to a little over a foot and a half in length, and are known to snack on bugs, bird eggs, and sometimes their own babies.

Tuatara embryos, which can take a year to hatch, become male in warmer temperatures. Lately, the number of female tuataras have been dropping, according to a recent study, in part because current temperatures may be tipping the balance toward male hatchlings. “That’s a double whammy,” Janzen says. Fewer males might still be able to keep a population going with enough females, but not the other way around, he says. And in their island habitats, there’s nowhere for tuataras to go as temperatures climb. “That’s what I mean by double whammy — whammy of having a restricted range, and also producing boys.”

Fish

Fish sex is all over the place. For many species, sex chromosomes determine the sex fish are born with — kind of like with humans. But for some, like the Argentinian silverside, temperature is the deciding factor, with warmer waters pushing embryos to become male. That could mean the number of females for this popular sport fish will drop as global temperatures rise, something researchers are already spotting in the wild.

Scientists still don’t fully understand the advantages of using temperature to determine an embryo’s sex, Janzen says. “Why on earth did these animals leave such a fundamental trait totally up to the vagaries of the environment? It’s not like eye color or something,” Janzen says. But it’s important to find out: “It’s probably part of the answer to the puzzle of how we’re going to keep these animals on this Earth for the foreseeable future.”