Recent evidence indicates that priming participants with religious concepts promotes prosocial sharing behaviour. In the present study, we investigated whether religious priming also promotes the costly punishment of unfair behaviour. A total of 304 participants played a punishment game. Before the punishment stage began, participants were subliminally primed with religion primes, secular punishment primes or control primes. We found that religious primes strongly increased the costly punishment of unfair behaviours for a subset of our participants—those who had previously donated to a religious organization. We discuss two proximate mechanisms potentially underpinning this effect. The first is a ‘supernatural watcher’ mechanism, whereby religious participants punish unfair behaviours when primed because they sense that not doing so will enrage or disappoint an observing supernatural agent. The second is a ‘behavioural priming’ mechanism, whereby religious primes activate cultural norms pertaining to fairness and its enforcement and occasion behaviour consistent with those norms. We conclude that our results are consistent with dual inheritance proposals about religion and cooperation, whereby religions harness the byproducts of genetically inherited cognitive mechanisms in ways that enhance the survival prospects of their adherents.