Instead of fleeing randomly when faced with a predator, sheep attempt to bury themselves within their flock, new UK research has shown.
The theory that animals moving in groups retreat towards the centre of their flocks if a predator appears has been tested before.
But the researchers are the first to show that sheep behave this way using GPS technology.
Details of the work are published in the journal Current Biology .
Dr Andrew King of The Royal Veterinary College in London co-authored the paper with colleagues from UCL and Cambridge University.
After training an Australian Kelpie working dog to herd a flock of sheep towards an open gate, Dr King's team tracked the movement of the individual sheep as they reacted to the threat and interacted with each other.
Their research shows that as the dog got within 70m of the flock, the sheep began to clump towards the centre of the group.
The British evolutionary biologist Bill Hamilton predicted that individuals within groups move towards the centre when danger appears in order to reduce the chance of being picked off by a predator.
Controlling the threat
However, studying group reactions to predation is very difficult, as it is often challenging to predict when an attack is imminent.
By using the sheep dog, the researchers controlled the experiment and by placing GPS receivers in a small "backpack" on each sheep, it was possible to record all the movements of the animals.
"For the first time, we could show the individual movement trajectories of all the animals involved," explained Dr King.
"Before, we could 'say, yep, they move in and run to the centre'. But because of the GPS backpacks tracking movement every second, [we were able] to monitor every animal when they were under threat".
"The field of collective behaviour is undergoing rapid change at the moment," Prof Jens Krause of Humboldt University in Germany, who was not involved with the project, told BBC News.
"We are getting better and better techniques for studying what is going on and understanding the mechanisms by which animals organise and accomplish collective feats, like sudden changes in direction."
The researchers hope their work will act as a baseline on which further studies into how neurological changes can affect behaviours between individuals can be built.