In 2012, herpetologists in Costa Rica’s Tempisque River Basin documented something strange: The ratio of male to female crocodiles in the basin was dramatically skewed. Chris Murray, then a herpetology graduate student at Auburn University, decided to investigate. A previous study had found that males outnumbered females by more than 3:1, “the most heavily skewed sex ratio reported for any member of the family Crocodylidae,” Murray would later write in his dissertation. When he and a team of researchers examined the population, they found that the ratio was even worse: Eighty percent of the hatchlings they found were male.

Murray hypothesized that the skew might be due to warming temperatures in the basin, which can influence the sex of a crocodilian—a group of reptilian species that includes crocodiles, alligators and caimans. But measuring the temperatures of nests proved that hypothesis wrong. So he decided to look instead at a potential toxin in the ecosystem: methyltestosterone (MT), a steroid used by tilapia farmers to artificially switch the sex of female fish and produce bigger, faster-growing male fish. Skewed hatchling ratios had been found near one nearby tilapia farm, though that farm wasn’t necessarily using the steroid.

When Murray’s team applied varying doses of MT to fertilized alligator eggs (often used as a proxy for crocodile eggs in research), they found that the treatment indeed produced male hatchlings at female-producing temperatures. In fact, even seemingly female hatchlings exposed to low doses of MT turned out to have hermaphroditic organs, which could ultimately impact their fertility. This was bad news for the crocs: Given a few generations, it’s difficult to imagine how long such a male-heavy population could survive.

Murray is careful to note that tilapia farms aren’t necessarily introducing MT into the Tempisque River Basin. “We don’t want to speculate because we can’t say it’s in the ecosystem at all,” he says. But his research, which is set to be published in General and Comparative Endocrinology this September, does suggest that endocrine-disrupting steroids could pose a serious threat to some of the toughest and longest-surviving animals in the world. Worse, these kinds of instances are just one of many ways that crocodilians are finding themselves increasingly under siege by their human neighbors.

With their ferocious jaws and body armor, people tend to think of crocodilians as virtually indestructible. Yet human activity has long posed a grave threat to these living tanks. In 1967, on the brink of extinction, the American alligator was listed as endangered as a result of habitat loss and over-hunting. Today they’ve mostly returned to healthy levels, but their fledgling success is fragile. As Laura Brandt, a scientist at the U.S. Fish and Wildlife Service, puts it: “They rebounded, but at what point do we make it so bad that they can’t recover? At some point it’s going to crash.”

Already in a precarious position, crocodilians now face an existential threat unlike any they have seen before. Climate change may not have been a factor in Murray’s study, but it’s part of the larger problem facing these animals. A range of human-influenced disruptions—climate change, endocrine disruption, manmade canals that interrupt water level cycles in wetlands, and freshwater marshes flooding with saltwater—are pushing crocodilians deeper inland. And the deeper inland they get, the more they are finding themselves in even closer proximity with humans themselves—which is likely leading to increased instances of human-crocodilian conflict.

Despite widely held misconceptions, neither American crocodiles or American alligators want anything to do with humans. To most crocodilians, an adult human is far too large to be worth attacking, says Mark Merchant, a biochemist specializing in crocodilians at McNeese University. Pets and children are more likely to be at risk, but only if they go near or into a crocodilian’s territory, he adds.

The problem is, more and more humans are entering what until now was crocodilian territory. Right now, the habitats of American alligators and American crocodiles overlap in only one place: Florida. (An estimated 1.2 million alligators live in the state’s freshwater swamps and marshes, while an estimated 1,000 crocodiles live in the saltwater habitats in southern Florida.) But already we’re seeing alligators push the limits of the northern and western edges of their range, says Kent Vliet, coordinator of laboratories at the University of Florida department of biology. “They may creep their way up the Atlantic seaboard into extreme eastern Virginia, and creep farther North in Gulf States and into Texas,” he says.

As they continue to retreat inland, human-crocodile conflict will only get worse. “If crocodiles and alligators are not hunted and killed, they are really, really good at adapting to modified environments,” says Vladimir Dinets, an animal behaviorist at the University of Tennessee. “Humans are not good at adapting side by side with them.” Already we are seeing increasing reports of human-crocodilian conflict, including the tragic story of the toddler killed by an alligator last month at Disney World, and the surfer who suffered a “vicious” crocodile attack this week off the coast of Costa Rica.

As a result, fear of the animals is on the rise. Sometimes this fear is unjustified; often animals are reported as “problem” alligators simply because they grow large and seem threatening. (Consider that in Florida alone, there have at least 13,000 nuisance alligator calls a year for the past 20 years according to the Florida Fish and Wildlife Conservation Commission. Meanwhile, actual alligator attacks in the state number fewer than 12 per year.) In other cases, increasing human proximity does increase the threat of conflict. Certain human behaviors such as feeding inadvertently teach the animals not to fear us, a factor that has been cited in the Disney World death. But when tragedy does occur, crocodilians often pay dearly. The search to find and kill the problem alligator typically involves killing several just to be safe, and Florida culls around 5 to 7,000 of the animals per year.

Crocodilians are undeniably tough. In the wild, the odds of any given crocodile surviving to adulthood are so slim that in each generation, only the fastest, smartest and toughest survive to reproduce. The ones that do can live up to 70 years and never stop growing. Their immune systems are among the strongest on the planet, so powerful that humans may someday tap them to fight antibiotic resistant bacteria, according to Merchant’s research. “They have all of these incredible adaptations,” Merchant explains, citing their advanced thermal regulation strategies and four-chambered hearts.

Yet they can also be tender. Many fail to realize that these animals owe much of their success not just to their brawn, but also to their intelligence and complex social behavior, says Kent Vliet, coordinator of laboratories at the University of Florida department of biology. Crocodilians can be trained to follow commands, and they have been observed using branches to lure birds in as prey, communicating by slapping the water and using vocal sounds, and co-parenting.

Vliet described one pair of American alligators he observed while doing field research. The female, he said, was a fiercely protective mother—even by alligator standards. One day, her male mate approached her outside of mating season and tapped her face with the tip of his snout. She did the same to him, and they both repeated this several times. Then, he swam off. It was a surprisingly touching moment. “In a bird or mammal pair, we could say this is pair bonding,” says Vliet. “We just don’t allow ourselves, because of our mammalian bias, to recognize their complexity.”

Tough yet tender, vulnerable yet resilient, human-fearing yet sometimes prone to conflict, these complex beasts have managed to stick around for millennia. Whether their success will continue, however, is an open question. With any luck, the same extraordinary qualities that helped crocodilians’ ancestors survive the age of the dinosaurs will help them overcome their newest challenge: navigating how to live alongside humans in peace. But can we learn to do the same?