Minnow-like Atlantic killifish spend their entire lives swimming in a toxic stew of chemicals in some of the United States’ most polluted waters. Now scientists have figured out why they are not just surviving, but thriving.

In four severely polluted East Coast estuaries, these little striped fish have evolved with genetic mutations that leave them tolerant of normally lethal doses of industrial pollution, according to a study led by University of California, Davis researchers to be published Friday in the journal Science.

Experts say this discovery may hold clues for better understanding how chemical pollutants affect people and animals.

“A big question has been: how quickly or readily do populations adapt in highly contaminated areas? This study really gets at that question,” says Christopher Martyniuk, a fish biologist at the University of Florida who was not involved in the new study.

Killifish, sometimes called mud minnows or mummichog, are abundant in the brackish waterways and marshes along the Atlantic coast. They’re an indicator species—one that is used as a barometer to gauge the health of ecosystems—because they are typically really sensitive to pollution, says lead study author and environmental toxicologist Andrew Whitehead.

Yet at some highly contaminated sites, scientists have found something unexpected. “You see killifish at these sites that are extremely tolerant of some very nasty chemical pollutants,” says Whitehead.

The fish there survive levels of pollution up to 8,000 times the lethal dose for most killifish. Yet they looked and behaved just like killifish from nearby non-polluted areas. The scientists suspected that these fish were molecular mutants—that there was some change in their genetic code that altered the way their bodies handled pollution without altering their physical appearance.

Whitehead and his colleagues wanted to take a closer look at these genetic changes so they collected nearly 400 killifish from New Bedford Harbor in Massachusetts, Newark Bay in New Jersey, the Bridgeport area of Connecticut, and the Elizabeth River in Virginia. These sites have been highly polluted since the 1950s and 1960s with dioxins, PCBs, mercury, and other industrial chemicals.

The researchers sequenced the entire genomes of these fish and compared them to the genomes of killifish in unpolluted waters nearby each site. The researchers found a common set of mutations among the pollution-tolerant fish. Many of these mutations help to deactivate or turn off a molecular pathway responsible for a lot of the cellular damage caused by the chemicals. This complex set of mutations was rare among fish living in the unpolluted areas. That’s probably because these mutations don’t provide a survival advantage for fish in clean waters, according to the researchers.

While the new findings provide evidence that killifish have rapidly evolved to survive in polluted waters, it doesn’t mean that other fish will evolve similar adaptations, says Whitehead.

Killifish are unique in that their species contains a lot more genetic diversity than most animals. The genetic mutations that allowed some to adapt were already present in these populations. Species that are less genetically diverse may not have the right molecular tools to adapt.

“It’s really important when the environment changes abruptly to have the necessary cards in hand,” he says.

Even for killifish, that adaptation may come at a price. In adapting to their new environment, the pollution-tolerant fish lost a little bit of their genetic capital: They became slightly less diverse.

“While local adaptation serves an immediate purpose, it’s possible that a loss of genetic variability could make it harder for killifish to cope with future environmental stressors,” says Luke Iwanowicz, a fish biologist with the United States Geological Survey in Leetown, West Virginia.

The findings could provide clues about which species are best and worst positioned to weather environmental changes. “Species that lack these sets of molecular responses might not do as well in an increasingly warmer or polluted world,” Martyniuk says.

The discovery may even help scientists figure out the genetic differences that make some humans more or less resilient to disease, Whitehouse says.