Forget cow tipping—next time you want to mess with a bovine friend, try waving a magnet in its face.

Researchers have found that when grazing or resting, cattle and deer tend to point their bodies toward Earth's magnetic poles, which suggests they are able to sense magnetic fields in the same way as many smaller animals.

German and Czech researchers used Google Earth satellite images to look at 8,510 domestic cattle in 308 pastures located randomly across six continents. They also studied body alignment in 2,974 red and roe deer in the Czech Republic, either by photographing the animals or checking the impressions they left in snow.

The team reports in Proceedings of the National Academy of Sciences USA that the animals tended to point north or south but not in other directions. When the researchers were able to examine the position of the head in the case of red and roe deer, they found the animals tended to point north.

The group ruled out other reasons, such as wind or sun, for why grazing animals might orient themselves that way. There was no consistent wind pattern among the different locations, study author Hynek Burda, a zoologist at the University of Duisburg–Essen in Germany, says. And if the animals were basking in the sun, researchers would have seen them standing outside of one another's shadows.

More tellingly, in places such as the coastal U.S. where the direction of the magnetic north pole differs from geographic north (the latter defined by Earth's axis of rotation), the group found that cattle positioned themselves toward the magnetic poles.

Researchers have found evidence for a magnetic sense in animals ranging from fruit flies to mice and mole rats to fish, amphibians and birds (but not humans). The study shows that "the magnetic sense is virtually ubiquitous," says sensory biologist John Phillips of Virginia Polytechnic Institute in Blacksburg, who has studied it in other animals. "It's not simply in the realm of animals that move very large distances."

The sense can come from small magnetic particles in cells, but some animals such as birds also seem to perceive magnetic fields as changes in light intensity, due to effects of the fields on light-sensitive pigments in the eye.

To look for a magnetic sense in larger animals, the group's first idea was to study camping humans, Burda says. "We wanted to study some kind of spontaneous behavior, because learning experiments can sometimes become very frustrating," he says.

Migratory animals may use the ability to get a sense of direction or construct a map in their heads for navigating, according to Phillips. Evidence for a magnetic sense in cattle and deer suggests to him that it may be a more basic tool for mentally mapping their everyday surroundings and learning new landmarks. "I think it'll…make us rethink what this kind of sensory ability is used for," he says.

It may also come in handy if you're ever lost in a cow pasture.