Dogs have a scientific way of going to the bathroom.

A new study, published in the journal Frontiers in Zoology, found that some dog breeds align themselves with the Earth’s magnetic field when they go to the bathroom.

“In this study, we provide the first clear and simply measurable evidence for influence of geomagnetic field variations on mammal behavior,” researchers from the Department of Game Management and Wildlife Biology at the Czech University of Life Sciences in the Czech Republic and the zoology department at the University of Duisburg-Essen in Germany wrote. “Furthermore, it is the first demonstration of the effect of the shift of declination, which has to our knowledge never been investigated before.”

The study had 70 dogs from 37 breeds defecate 1,893 times and urinate 5,582 times over the course of two years. For the first time, scientists found that dogs prefer aligning their bodies with the north-south axis of the Earth when the planet’s magnetic field was calm – roughly 20 percent of daylight hours. This finding may explain why similar experiments “were hardly replicable and why directional values of records in diverse observations are frequently compromised by scatter,” researchers wrote.

While researchers remain puzzled over why dogs are influenced by the Earth’s magnetic field, their sensitivity is not unusual. Other animals, like birds and fish, act similarly.

"It is still enigmatic why the dogs do align at all, whether they do it 'consciously' ... or whether its reception is controlled on the vegetative level (they 'feel better/more comfortable or worse/less comfortable' in a certain direction)," researchers wrote. “Our analysis of the raw data (not shown here) indicates that dogs not only prefer N-S direction, but at the same time they also avoid E-W direction.”

Despite the unanswered questions researchers have, they say their discovery has the ability to “open new horizons for biomagnetic research.”

The phenomenon challenges biophysicists to formulate testable hypotheses for mechanisms responsible for creatures' perception of magnetic fields. Finally, it forces biologists and physicians to seriously reconsider the effects magnetic storms might have on organisms.