Many models of cognition and of neural computations posit the use and estimation of prior stimulus statistics: it has long been known that working memory and perception are strongly impacted by previous sensory experience, even when that sensory history is not relevant to the current task at hand. Nevertheless, the neural mechanisms and regions of the brain that are necessary for computing and using such prior experience are unknown. Here we report that the posterior parietal cortex (PPC) is a critical locus for the representation and use of prior stimulus information. We trained rats in an auditory parametric working memory task, and found that they displayed substantial and readily quantifiable behavioural effects of sensory-stimulus history, similar to those observed in humans and monkeys. Earlier proposals that the PPC supports working memory predict that optogenetic silencing of this region would impair behaviour in our working memory task. Contrary to this prediction, we found that silencing the PPC significantly improved performance. Quantitative analyses of behaviour revealed that this improvement was due to the selective reduction of the effects of prior sensory stimuli. Electrophysiological recordings showed that PPC neurons carried far more information about the sensory stimuli of previous trials than about the stimuli of the current trial. Furthermore, for a given rat, the more information about previous trial sensory history in the neural firing rates of the PPC, the greater the behavioural effect of sensory history, suggesting a tight link between behaviour and PPC representations of stimulus history. Our results indicate that the PPC is a central component in the processing of sensory-stimulus history, and could enable further neurobiological investigation of long-standing questions regarding how perception and working memory are affected by prior sensory information.