SummaryHead direction cells in the mammalian limbic system are thought to function as an allocentric neuronal compass. Although traditional views hold that the compass of ground-dwelling species is planar, we show that head-direction cells in the rodent thalamus, retrosplenial cortex and cingulum fiber bundle are tuned to conjunctive combinations of azimuth, pitch or roll, similarly to presubicular cells in flying bats. Pitch and roll orientation tuning is ubiquitous, anchored to gravity, and independent of visual landmarks. When head tilts, azimuth tuning is affixed to the head-horizontal plane, but also uses gravity to remain anchored to the terrestrial allocentric world. These findings suggest that gravity defines all three degrees of freedom of the allocentric orientation compass, and only the azimuth component can flexibly remap to local cues in different environments. Collectively, these results demonstrate that a three-dimensional, gravity-based, neural compass is likely a ubiquitous property of mammalian species, including ground-dwelling animals.