Birds are famously good navigators. Some migrate thousands of miles, flying day and night, even when the stars are obscured. And for decades, scientists have known that one navigational skill they employ is an ability to detect variations in the earth’s magnetic field.

How this magnetic sense works, however, has been frustratingly difficult to figure out.

Now, two researchers at Baylor College of Medicine, Le-Qing Wu and David Dickman, have solved a central part of that puzzle, identifying cells in a pigeon’s brain that record detailed information on the earth’s magnetic field, a kind of biological compass.

“It’s a stunning piece of work,” David Keays of the Institute of Molecular Pathology in Vienna wrote in an e-mail. “Wu and Dickman have found cells in the pigeon brain that are tuned to specific directions of the magnetic field.”

Their report appeared online in Science Express on Thursday. Kenneth Lohmann at the University of North Carolina at Chapel Hill, who also studies magnetic sensing, said in an e-mail that the study was “very exciting and important.”