When it comes to climbing waterfalls, the Nopili rock-climbing goby really puts its teeth into it.

The inch-long (2.5 centimeter) fish uses suckers in its mouth and belly to move up steep cliffs in its rugged Hawaiian habitat.

Because its freshwater habitat is easily disturbedby a big storm, for instancethe fish often crawl up waterfalls to return upstream.

But how this odd creature evolved to trek vertical distances of up to a hundred feet (30 meters)the energetic equivalent of a person running a marathonwas unknown, said Richard Blob, an evolutionary biologist at Clemson University.

Now, a new paper by Blob and colleagues in the journal PLOS ONE shows that the fish uses the same movements to climb as it does to eat algae.

Before Blob and his student team could study the fish, however, they had to catch one. That proved a bit tricky. For instance, a goby would watch as a wetsuited scientist, struggling against the current, inched closerand then would scoot away. “You don’t want to attach too much personality to these animals,” but they almost had a mocking expression, Blob said with a laugh.

When enough fish were eventually caught, they were taken to a field laboratory in Hawaii. There the scientists filmed them feeding on algae-covered glass andstimulated by falling waterclimbing. “They’d climb up a garden hose if you gave it to them,” Blob quipped. (Also see pictures: “Nine Fish With ‘Hands’ Found to Be New Species.”)

By watching videos of both behaviors, the team concluded that the fish uses the same overall movements. For instance, the angle and distance at which the front part of the upper jaw protrudes are nearly identical during both behaviors.

This suggests that, at some point in its evolution, the Nopili rock-climbing goby repurposed one behavior for anothera known evolutionary phenomenon known as exaptation, in which a species will “take a structure or behavior and co-opt to do something totally different.”

The classic example of exaptation is bird feathers, said Blob, “which may have evolved as an insulation structure before they were co-opted, or exapted, with some evolutionary changes for use in flight.”

Though it’s still unknown which behavior came first, the end result is a perfectly adapted fish.

“How finely tuned these fish are to this habitat is just amazing,” said Blob.

1996-2013 National Geographic Society