Chimpanzees (Pan troglodytes) and bonobos (Pan paniscus) (Study 1) and 18- and 24-month-old human children (Study 2) participated in a novel communicative task. A human experimenter (E) hid food or a toy in one of two opaque containers before gesturing towards the reward's location in one of two ways. In the Informing condition, she attempted to help the subject find the hidden object by simply pointing to the correct container. In the Prohibiting condition, E held out her arm toward the correct container (palm out) and told the subject firmly ‘Don't take this one.’ As in previous studies, the apes were at chance in the Informing condition. However, they were above chance in the new Prohibiting condition. Human 18-month-olds showed this same pattern of results, whereas 24-month-olds showed the opposite pattern: they were better in the Informing condition than in the Prohibiting condition. In our interpretation, success in the Prohibiting condition requires subjects to understand E's goal toward them and their behavior, and then to make an inference (she would only prohibit if there were something good in there). Success in the Informing condition requires subjects to understand a cooperative communicative motive – which apparently apes and young infants find difficult.