The mangrove killifish is one of only two vertebrates known to reproduce predominantly through ‘autogamy’, or self-fertilization, but scientists still don’t fully understand how the species maintains genetic diversity.

Luana Lins, a postdoctoral student at Washington State University, along with several colleagues at WSU, Stanford University and the University of Alabama, sequenced the entire genomes of 15 lineages of killifish in an attempt to unravel the mystery of the hermaphrodite fish.

The killifish species does include a very small number of males which can add a certain degree of additional diversity to the gene pool. However, the team’s findings, published in the journal Genome, show a "remarkable amount" of genetic diversity in the species given the level of self-fertilization.

READ MORE: Polish town bans 'hermaphrodite' Winnie the Pooh because of ‘dubious sexuality'

"We found way more areas that were heterogeneous (dissimilar pairs of genes), heterozygous, than we expected if you just followed the logic of something that has been mating with itself for a long time," Lins said in a press release. "That opens up a can of worms. How is that happening?"

The pinkie-sized marine animal is exceptional for reasons beyond its self-loving lifestyle: the mangrove killifish can survive in water of any salt concentration, from freshwater to water that's twice as salty as the sea. It can also survive for up to two months out of the water by breathing through its skin, similar to amphibians. The fish later returns to the water by performing a series of 180-degree flips.

Mystery shark caught off Portugal belongs to 80mn year old species (PHOTOS) https://t.co/WCtYr0Suxl — RT (@RT_com) November 10, 2017

The whole reason for heterogenous sexual reproduction in nature is to allow a species to adapt to the ever-changing environment by constantly maintaining genetic diversity, thus increasing the odds of survival. Usually an egg carrying the mother's genes is fertilized by a sperm which carries the father's genetic code.

Hermaphroditic reproduction - or ‘selfing’ - can lead to a heightened risk of dangerous mutations becoming the norm within what is a relatively closed gene pool.

The killifish, also known as the mangrove rivulus, Kryptolebias marmoratus, or just plain ‘Kmar’, can somehow sense when there are fish from another genetic lineage, or a rare male, nearby and tend to produce more eggs than usual in an as-yet inexplicable phenomenon.

"How they know how different the other individual is, we don't know," said Lins. "There are a lot of unknowns, and I think that's the fun of science. We're all trying to figure out what is going on with these fishes."

Some postulate that the creature may just have a higher rate of mutation than others and this affords it the genetic diversity to adapt to an ever-changing environment. Lins’ team of researchers propose further sequencing of additional lineages to unlock the mysteries of this self-loving fish.