Two of the most biologically relevant aspects of prey species are the motivation to obtain food and evade predation. This commutation between a predator encounter and procuring food requires real-time estimations, computations and actions orchestrated by the brain to optimize the most desirable outcome. To analyze this particular cost-benefit relationship, , mice were obligated to jeopardize their safety to acquire food in the presence of a rat predator. Our studies reveal that introduction of a rat dynamically transforms foraging and food consumption in hungry mice contingent on the current level of threat posed by the predator through a specific signaling pathway.