The piranha's reputation as a fearsome predator may not be fully deserved, scientists in the UK have announced.
The sharp-toothed fish live in the Amazon region
Found in the Amazon, piranha fish have been portrayed as killer carnivores who work together to overwhelm their prey and strip its flesh.
But experts from St Andrews University say that piranhas are omnivores who mainly eat fish, plants and insects.
They form large groups not to hunt but to defend themselves against other predators, the team said.
"Previously it was thought piranhas shoaled as it enabled them to form a cooperative hunting group," said Professor Anne Magurran.
"However, we have found that it is primarily a defensive behaviour."
Piranhas could be attacked by dolphins, caimans and large fish, and forming a shoal is their way of avoiding being eaten, she said.
Fish of reproductive age stay in the centre of the shoal for protection and the size of the shoal depends on the level of risk.
"At high water the fish swim in small shoals, as there is more space to avoid predators, and the threat is low," Professor Magurran said.
"However, when the water level drops, isolating the flood water into smaller lakes and channels, shoals can grow to over 50 fish due to the close proximity of predators."
The team is displaying its research, along with a tank of live piranhas, at the Royal Society Summer Science Exhibition in London.