Stepping in a fresh steaming pile is the bane of the urban resident. In Israel, the law requires dog owners to pick up after their pets. Yet how many of us have noticed that doggies secrete in a strictly north-south orientation?

Scientists from Germany and the Czech Republic have discovered that man’s best friends defecate according to the orientatin of Earth’s magnetic field.

“The dogs are very precisely oriented on the north-south axis while pooping, but only if the magnetic field is stable,” says Petra Kovakova from the Czech University of Life Sciences, who studied the body positions of 70 dogs while they did their business outdoors.

Kovakova and her colleagues observed 37 breeds, and the evidence was clear. All shapes and sizes eschewed a poop toward the east or west if they had another option, though it’s still a mystery why.

The scientists ruled out the sun’s position as a factor, having witnessed the magnetic-field phenomenon in various seasons and at different times of the day. And during solar flares or geomagnetic storms, the magnetic field fluctuates. That’s when pooches take a more random approach.

“On January 6 the magnetic field was very stable, which means that the dogs were very well oriented during pooping,” Kovakova says. “On January 2 the magnetic field was very restless and the dogs were pooping in a random fashion.”

Many animals are believed to use the Earth’s magnetic field for navigation, including birds. Humans don’t share this instinct, notes the lead researcher, Prof. Vlastimil Hart. “We need to use a compass to get from point A to point B,” he says. “The animals know this all instinctively.”

The scientists say their research may help biologists understand the effects of magnetic storms on organisms – a bottom-up approach, as it were.

In any case, if Israelis get too preoccupied with their dogs' rear ends and the north-south axis and forget to pick up the poo, they could wind up with a fine topping 700 shekels ($200). And in the not-too-distant future the law will bite harder: Israeli cities are looking to build a database of doggie DNA. Meanwhile, in despair at certain dog-loving but louche residents, Kiryat Bialik near Haifa has announced a 24/7 posse of undercover cops who lurk in parks at night to catch canine offenders in the act.