Whilst the creatures can clearly be seen to react to a jab or blow, experts have disagreed over whether the reaction indicates a sensation of pain, or is little more than a basic reflex.
Researchers set out to establish the truth with an experiment in which goldfish were exposed to painful heat. Half of the fish were given a painkilling injection of morphine beforehand, while the other half were not.
Two hours later, the fish that had undergone the test without painkillers showed signs of fear and wariness – suggesting, say the researchers, that they had suffered a bad experience and remembered it.
The academics, from Norway and the US, say their finding undermines claims that fish merely display reflex actions and do not sense pain.
"The results show that it could not have been a simple reflex action," said Dr Joseph Garner.
"The fact that their behaviour changed so much really strongly suggests there is something going on with their memory and experience of that event that is not a reflex. I believe it does show that fish feel pain."
For the experiment, each fish was fitted with a miniature jacket containing a tiny flexible foil heater similar to those used in the aerospace industry to keep wires and electrics dry. The heaters had an upper safety limit of 50C to prevent harm.
Both groups of fish – those given morphine, and the control group which were injected with inactive saline solution – showed a similar "escape response" when the heater was turned up to around 38C, equivalent to a fairly hot bath.
As soon as the behaviour was noted, the heat was turned off to prevent suffering.
An escape response consisted of curling the body or flicking the tail in a way that would have propelled the fish away had its movements not been restricted.
However, the difference between the groups emerged after the fish had been returned to their normal home tanks. Two hours later, it was the fish which had not been given morphine which were more likely to display fearful behaviour such as "hovering".