Taking someone else’s visual perspective marks an evolutionary shift in the formation of advanced social cognition. It enables using others’ attention to discover otherwise hidden aspects of the surroundings and is foundational for human communication and understanding of others. Visual perspective taking has also been found in some other primates, a few songbirds, and some canids. However, despite its essential role for social cognition, visual perspective taking has only been fragmentedly studied in animals, leaving its evolution and origins uncharted. To begin to narrow this knowledge gap, we investigated extant archosaurs by comparing the neurocognitively least derived extant birds—palaeognaths—with the closest living relatives of birds, the crocodylians. In a gaze following paradigm, we showed that palaeognaths engage in visual perspective taking and grasp the referentiality of gazes, while crocodylians do not. This suggests that visual perspective taking originated in early birds or nonavian dinosaurs—likely earlier than in mammals.