They are often said to have a three-second memory, but the brain power of fish has been considerably underestimated, according to scientists who found some fish can recognise themselves in the mirror.

Their findings suggest that a small, otherwise unremarkable species called the cleaner wrasse has joined an elite handful of others to have passed the so-called mirror test, which has been used for decades as a gold standard measure of animal intelligence.

Passing the test is widely viewed as an indication of self-awareness and until now the only animals to have crossed this threshold are great apes, bottlenose dolphins, killer whales, Eurasian magpies and a single Asian elephant. Now the select club may have an unlikely new member.

“These fish are fascinating in their breadth of cognitive abilities – and underappreciated,” said Alex Jordan, an evolutionary biologist at the Max Planck Institute for Ornithology in Germany and the study’s senior author. He and colleagues are calling for an overhaul of the traditional hierarchy of animal intelligence, saying that despite their reputation for being “basically vacant”, fish perform exceptionally well on certain tasks.

The prospect of fish rising up the ranks of animal cognition has not been universally welcomed though, and the paper proved so controversial it took the authors five years to get it published. “Some areas of the academic community seem fairly intent on fish not joining the pantheon of smart things because then their own animals lose their special place in the world,” said Jordan.

The cleaner wrasse (Labroides dimidiatus) is about 10cm long with a stripe, and lives in coral reefs. Previous research has revealed these fish have complex social lives, forming allegiances and enemies, making logical inferences about whether they will beat other fish in fights and showing a capacity for deception. The fish live in mutually beneficial partnerships with larger client fish from whom they feed on dead skin and parasites.

During the mirror test, the researchers placed a mark on the fish in a location that could only be seen in a mirror reflection. Initially, the fish reacted aggressively and repeatedly tried to bite their reflections. But over the next few days, they stopped biting and started “behaving weirdly” in front of the mirror, swimming upside down, for instance, or doing repeated bursts of acceleration past the mirror.

An orangutan recognises itself in a mirror, widely viewed as an indication of self-awareness. Photograph: David Allen Brandt/Tony Stone

According to the authors, the fish were “contingency testing” – doing strange things to see whether the reflection did the same as a way of figuring out the function of the mirror. They were also observed attempting to remove the marks by scraping their body on hard surfaces after viewing themselves in the mirror. These activities were not seen when the fish were given marks without a mirror present or when they interacted with marked fish across a clear divider.

“It’s not that this proves fish are as smart as chimpanzees,” said Jordan. “It shows that in this task the fish can perform in a similar way. They can understand what the mirror does and use the mirror to see its own body.”

He added it did not necessarily imply fish were self-aware, but the findings challenged the idea that animal intelligence follows a continuum, with chimpanzees at the top and fish, insects and reptiles at the bottom.

Prof Gordon Gallup, a psychologist at the University at Albany in New York, who pioneered the mirror test in 1970, disputed whether the fish really recognised themselves.

He said in their “zeal to undermine the integrity” of the gold standard test the authors may have overlooked other explanations. The behaviour could be explained because the fish were evolutionarily programmed to be interested in skin markings, Gallup suggested. “There is a distinct possibility that these findings may be an artefact of using marks that simulate ectoparasites,” he said.

Jordan said some of the criticisms were prompted by people’s preconceptions about fish, rather than scientific objectivity, which he said was “a bit sad and disappointing”.

“When it’s a fucking elephant and one of two elephants passes the test, everyone’s like ‘Yeah cool’,” said Jordan. “When it’s a fish they’re like, ‘Ooh you need a conspecific control and a control for empathy and a control for this and that … the fish are not doing this’.”

The authors said the findings raised questions about fish welfare. “We must be very careful as scientists and humans not to let our loss of empathy towards animals that look different to us influence our opinion of what they experience,” said Jordan.

“Otherwise, we conveniently forget or ignore that fish and other animals are sentient and, for instance, our entire practice of commercial fishing lets these animals die in stress and pain on the decks of boats.”

The findings are published in the journal PLOS Biology.