If you want to see evolution in action, look no further than the island of Rarotonga in the South Pacific, where fish have evolved the ability to survive outside water as a means of escaping predators.

Four species of blennies on Rarotonga in the Cook Islands have independently emerged from the ocean to spend varying amounts of time on the rocky shoreline, according to a new study by scientists at UNSW and the Australian National University, and published in The American Naturalist.

"It turns out the aquatic environment is a nasty place for blennies, full of enemies wanting to eat these small fish. But life is less hostile on the rocks, with birds their main worry," said study first author Dr Terry Ord of UNSW Sydney in a statement.

The researchers observed three of the amphibious blenny species, which live on water, rocks and exposed land above the high tide mark. The fish spent low tide swimming in rock pools and when the tide came in most of them "moved to higher ground, above the high tide mark, apparently to avoid being eaten by the aquatic predators coming in with the rising water."

To find out what would happen to fish that remained in the water, the scientists put replica blennies into the sea. These faced far more attacks from ocean-dwelling predators, such as flounders and moray eels, than predators on shore, showing the benefits of moving out of the water, according to the statement.

Other reasons the fish might move onto land, include the search for new sources of food, to reduce competition for resources, or to escape adverse fluctuations in water conditions, said the scientists.