During Ramadan, people of Muslim faith fast by not eating or drinking between sunrise and sunset. This is likely to have physiological and psychological consequences for fasters, and societal and economic impacts on the wider population. We investigate whether, during this voluntary and temporally limited fast, reminders of food can impair the fasters' reaction time and accuracy on a non-food-related test of cognitive control. Using a repeated measures design in a sample of Ramadan fasters (N = 190), we find that when food is made salient, fasters are slower and less accurate during Ramadan compared with after Ramadan. Control participants perform similarly across time. Furthermore, during Ramadan performances vary by how recently people had their last meal. Potential mechanisms are suggested, grounded in research on resource scarcity, commitment, and thought suppression, as well as the psychology of rituals and self-regulation, and implications for people who fast for religious or health reasons are discussed.