Desert ants (Cataglyphis fortis) were trained to follow a fixed route around a barrier to a feeder. Their homeward trajectories were recorded on a test field containing a similar barrier, oriented either as in training or rotated through 22 or 45 . Under one set of experimental conditions, the homeward trajectories rotated with the orientation of the barrier, implying that the visual features of this extended landmark can determine the route independently of compass cues: the barrier provided a "visual scene" that controlled the trajectories of the ants. Under other conditions, the trajectories after rotation were a compromise between the habitual compass direction and the direction with respect to the rotated barrier. Trajectories were determined primarily by the visual scene when ants were allowed to return close to the nest before being caught and tested. The compromise trajectories were observed when ants were taken from the feeder. It seems that ants exhibit at least two separate learnt responses to the barrier: (i) a habitual compass direction triggered by the sight of the barrier and (ii) a visual scene direction that is compass-independent. We suggest that the weighting accorded to these different learnt responses changes with the state of the path integration system.