Tourists approaching wild animals can potentially cause disturbance as a result of the perceived predation risk. Risk effects arise when prey alter their behaviour in response to predators. This response may carry costs through its impact on fitness-related activities such as foraging. We recorded behavioural responses of whale sharks Rhincodon typus to experimental vessel and swimmer approaches. We simulated the disturbance caused by ecotourism in the foraging site of this planktivorous fish in Bahia de Los Angeles, Gulf of Baja California, Mexico. Stress-related behaviours (vigilance, change of direction, diving and acceleration) were more common directly after both types of disturbance than before, in particular after approach by a swimmer. Individuals were more likely to be vigilant when they were new to the bay, but we did not find evidence of within-season behavioural habituation. Sharks were 24% more likely to forage before human stimuli than after. Our study highlights negative effects of vessel and swimmer approaches on whale shark behaviour, with a short-term increase in stress-related behaviours potentially carrying energetic costs, combined with a decrease in food intake following the disturbance. Our results indicate concerns about the impact of ecotourism on large fish species. An important next step would be to determine whether these short-term behavioural responses to the perception of predation risk negatively affect fitness. Among other guidelines, we recommend preventing swimmers from approaching if whale sharks stop feeding when a vessel approaches.