The art of mimicry is well known in the natural world with species using various ruses to catch, mate with or avoid others.
However such deception strategies quickly lose their effectiveness if they become too well known, leading to the target species being more vigilant and learning to avoid the mimic.
Now scientists have found a predator that has overcome such problems and also brought itself other survival benefits by being able to disguise itself as a range of species.
The dusky or brown dottyback (Pseudochromis fuscus), is a coral reef fish which commonly feeds on juvenile damselfish.
Wolf in sheep's clothing
It can change the colour of its body to match the species of reef fish it is hunting, ensuring the element of surprise for the dottyback.
The findings appear in the journal Current Biology.
“By changing colour to imitate local damselfish communities, dottybacks are able to overcome the predator avoidance behaviour in the juvenile fish they hunt,” said co-author Dr William Feeney, from the University of Cambridge.
“The dottyback is a wolf in sheep’s clothing – distinguishing the predator from the harmless ‘flock’ becomes increasingly difficult when they look alike, allowing the dottyback to creep up on unsuspecting juvenile damselfish.”
Brown, yellow, pink, orange and grey dottyfish have been reported across their range in the Indo-Pacific.
The researchers focused on the yellow and brown colours of those living off Lizard Island, on the northern part of the Great Barrier Reef, Australia. The area has populations of both yellow and brown damselfish.
The scientists built simulated reefs of both live coral and coral rubble and stocked them with either yellow or brown damselfish. Yellow and brown dottybacks were then released into the reefs.
They found that dottybacks only changed their colour when they encountered damselfish of a different colour, changing from yellow to brown or vice versa over the course of about two weeks.
Dottybacks do this by increasing the ratio of yellow pigment cells compared with black pigment cells in their skin.
The team also found that once dottybacks matched the colour of adult damselfish, they were up to three times more successful at capturing juvenile damselfish.
Dottybacks ability to change colour not only helps them to attack prey but also reduces the risk of them being eaten themselves.
A pretty crafty little fish
Both dottybacks and damselfish share a common predator in the coral trout. Damselfish naturally match the colour of their habitat.
The scientists measured the strike rates of coral trout when exposed to images of different coloured dottybacks against different habitats.
They found that fish that stood out from their environment were more often attacked by the coral trout.
“Damselfish have evolved to blend into their environment, so by imitating the damselfish dottybacks also colour-match the habitat - making it harder for coral trout to see them,” said Dr Feeney.
“This is the first time that an animal has been found to be able to morph between different guises in order to deceive different species, making the dottyback a pretty crafty little fish.”
You can follow BBC Earth on Facebook, Twitter and Instagram.