A new film captures a circular game of copycat: a fish that mimics an octopus that mimics fish.

First described by scientists in 1998, the remarkable mimic octopus (Thaumoctopus mimicus) can shift its shape, movements and color to impersonate toxic lionfish, flatfish and even sea snakes. Such mimicry allows it to swim in the open with relatively little fear of predators.

The black-marble jawfish (Stalix histrio), on the other hand, is a small, timid fish. It spends most of its adult life close to a sand burrow that serves as its hideout if a predator comes along.

"All jawfish are really specialized for living in burrows," said researcher Luiz Rocha, an ichthyologist at the California Academy of Sciences in San Francisco. "They're almost never found outside their burrows."

Unexpectedly, during a diving trip in Indonesia in July, researcher Godehard Kopp of the University of Gottingen in Germany filmed a partnership between the pair of animals. He saw what appeared to be a black-marble jawfish closely tagging behind the octopus as it moved across the sandy seafloor. The jawfish possessed brown-and-white markings similar to ones on the octopus it was following that made it difficult to spot among its many arms. The octopus, for its part, did not seem to notice or care for its entourage. [Watch the video]

"It's a pretty unique observation of mimicry — most of the time, a mimicking animal doesn't actually follow the model it is mimicking," Rocha told LiveScience. "But the mimicry wouldn't work otherwise for this jawfish."

The researchers suggest the jawfish hitches a ride with the octopus in order to safely venture away from its burrow to look for food.

"The jawfish found a way to get around in the open and not get eaten by anything else," Rocha said. "It's not a good swimmer, so any grouper or snapper or predatory fish would easily grab it otherwise."

In Rocha's opinion, this jawfish evolved its brown-and-white coloration first and then later discovered the advantage of sticking close to the octopus. "Those jawfish that did gain this advantage survived more often and got more offspring, so this behavior spread throughout the population," he explained.

"Unfortunately, reefs in the Coral Triangle area of southeast Asia are rapidly declining mostly due to harmful human activities," Rocha said. "We may lose species involved in unique interactions like this even before we get to know them."

Rocha, Kopp and their colleague Rich Ross detailed their findings in the December issue of the journal Coral Reefs.

Follow LiveScience for the latest in science news and discoveries on Twitter @livescience and on Facebook.