Leafcutter ants, Atta colombica, forage over 250 m in structurally complex, Neotropical rainforests that occlude sun or polarized light cues. Night foraging makes the use of celestial cues and landmarks all the more difficult. We investigated the directional cues used by leafcutter ants to orient homeward by experimentally reversing the polarity of the local magnetic field and by experimentally subjecting the ants to a strong magnetic pulse to disrupt a magnetic compass. In both experiments, we transferred homeward-bound ants from a foraging trail to a table in a chamber that occluded landmark and celestial cues. In both experiments, control ants showed path integration and walked directly towards the nest. In the reversed field, one-half of the experimental ants oriented according to the reversed field (geographically 180° opposite to the nest's direction), indicating that they used a magnetic compass to update their positional reference derived from path integration. The other half walked towards the nest, suggesting that they may have used an egocentric reference to measure their rotation when displaced, although other explanations have not been entirely excluded. With application of a very brief, but strong, magnetic pulse, experimental ants oriented randomly. We conclude that the leafcutter ants use the earth's magnetic field as a reference by which to orient when path-integrating towards home.