A baby loggerhead sea turtle. (Gerald Martineau/For The washington Post)

Female sea turtles are known to return to the beaches where they were born to lay their own eggs -- even if they have to swim thousands of miles to do it. But since they make their first trip away from home when they're just itty bitty newborn turtles, how they find their way back has long been a mystery.

According to a study published Thursday in Current Biology, these expert navigators may be drawn home magnetically.

The study used loggerhead sea turtles, who are known to use magnetic fields to navigate when they're in the open ocean. But  it turns out that they may use exactly the same navigation system when they're en route to lay eggs.

When researchers compared records of the Earth's subtly shifting magnetic fields with records of sea turtle nesting, they found a connection. From Discovery News:

For example, in some cases the Earth’s field shifted so that the magnetic signatures of adjacent locations along the beach moved closer together. When that happened, nesting turtles packed themselves along a shorter stretch of coastline. In places where magnetic signatures diverged, sea turtles spread out and laid their eggs in nests that were fewer and farther between.

"It's pretty fascinating how these creatures can find their way through this vast expanse of nothing," study co-author J. Roger Brothers, a biology graduate student at the University of North Carolina, told National Geographic.