We examined the ability of bonobos, Pan paniscus (N = 39), and chimpanzees, Pan troglodytes (N = 74), to infer the target of an experimenter’s visual attention in a series of three experiments. In each experiment subjects were first introduced to a novel object while an experimenter’s (E1) visual access to this object was manipulated by (1) having E1 orient towards or away from the object, (2) positioning a visual occluder that did or did not block E1’s view of the object, or (3) substituting a different experimenter for E1 during the introduction phase of the trial. After subjects were introduced to the objects in one of these ways, E1 vocalized excitedly while gazing ambiguously towards the previously introduced target object and a second location on the same visual plane. In each experiment we measured whether subjects looked at the object or the alternative target of the E1’s gaze. We predicted that if subjects recognized when E1 was previously familiar with the object, they would search for an alternative target of his attention more frequently in these trials. In all three contexts, chimpanzees, and in one context, bonobos, behaved consistently with this prediction. These results are not easily explained by learning or behaviour-reading hypotheses because responses were never rewarded, few trials were conducted per subject, and the experimenter’s behaviour was the same across experimental conditions at the moment subjects were required to respond. Therefore, similar to human infants, subjects most likely remembered what the experimenter had or had not seen in the past, allowing them to infer the target of his attention in the present.