High levels of toxins were found in the organs of 21 whales that died during a mass stranding, it has emerged.

A total of 31 long-finned pilot whales beached on the shore between Anstruther and Pittenweem in Fife in 2012.

Scientists have now determined they had high levels of mercury in their brains, with Aberdeen University researchers saying the chemical may have been a factor in the whales swimming off-course.

They also found long-finned pilot whales may be less susceptible to mercury poisoning than humans and said there is no concrete evidence that it was the cause of the stranding.

Dr Eva Krupp, an environmental analytical chemist from Aberdeen University, said: "We were able to gather an unprecedented number of tissue samples from all the major organs including the brain and as a result we can see for the first time the long term effects of mammalian exposure to the environmental pollutants.

"This pod of whales provides unique new insights because we were able to look at the effects on a large number of whales from the same pod and how this varied according to age."

Samples taken from the whales suggested that mercury levels increased as they aged and were significantly higher in members of the pod who were over nine years old.

“We can see clear evidence that mercury is being transported through the blood stream to all organs where it accumulates over the lifespan,” Dr Krupp added.

The amount of mercury in the oceans has risen significantly since the industrial revolution.