Many animals rely on path integration for navigation and desert ants are the champions. On leaving the nest, ants continuously integrate their distance and direction of travel so that they always know their current distance and direction from the nest and can take a direct path to home. Distance information originates from a step-counter and directional information is based on a celestial compass. So far, it has been assumed that the directional information obtained from ocelli contribute to a single global path integrator, together with directional information from the dorsal rim area (DRA) of the compound eyes and distance information from the step-counter. Here, we show that ocelli mediate a distinct compass from that mediated by the compound eyes. After travelling a two-leg outbound route, untreated foragers headed towards the nest direction, showing that both legs of the route had been integrated. In contrast, foragers with covered compound eyes but uncovered ocelli steered in the direction opposite to the last leg of the outbound route. Our findings suggest that, unlike the DRA, ocelli cannot by themselves mediate path integration. Instead, ocelli mediate a distinct directional system, which buffers the most recent leg of a journey.