A specialized diet and the ability to adapt allowed blennies, also known as "land fish," to move out of the water and live on land, according to a new study.

The research notes that some species of blenny transitioned out of the water millions of years ago, but they've evolved during that time, including developing teeth that can scrape rocks for food and skin that blends in with their surroundings to avoid predators.

"Some species of blennies never emerge from water and others stay on land full-time as adults — so they present a unique opportunity to study fish evolution in action and explore the transition from water to the land in a living animal," said the study's lead author Terry Ord in a statement.

A group of Pacific leaping blennies out of the water on the foreshores of Guam. (Credit: Terry Ord, UNSW Sydney)

RARE WHALE WITH LONG, SPIKY TEETH WASHES UP AT CALIFORNIA BEACH

Having a specialized diet allowed certain species of blenny to adapt to environmental changes or continue to evolve to further the species, the researchers noted.

"In this study, we found that having a flexible diet has likely allowed blennies to make a successful leap onto land — but once out of the water, these remarkable land fish have faced restrictions on the type of food available to them," Ord added.

The researchers looked at data on hundreds of different species of blennies, including diet, behavior and the rate at which different species emerged from the water, to come up with their findings.

WORLD'S LARGEST SUBTERRANEAN FISH DISCOVERED IN INDIAN CAVE – AND IT'S BLIND

"These restrictions have triggered major evolutionary changes in their morphology, specifically dramatic changes in their teeth, as they have been forced to become specialist scrappers of the rocks to forage on algae and detritus," Ord explained.

Some species of blenny live exclusively in the water, while others hop in and out of the water, which not only alters their environment but can alter their body's temperature and oxygen levels. Other species, such as the rockskipper, spend the majority of their lives on land.

"Our findings suggest that being a jack-of-all trades –­ for example, being flexible in the types of foods you can eat and being flexible in leaving water for very brief periods of time –­ can open the door to making what would seem to be a really dramatic change in habitat," Ord continued.

The study has been published in the scientific journal Functional Ecology.

GET THE FOX NEWS APP