AbstractShoaling, the formation of social groupings in fish, can provide benefits including reduced predation risk. However, it can also inflict costs including increased competition for resources, transmission of parasites, and salience to predators. Trinidadian guppies exhibit inter-population variation in shoaling behavior where individuals coexisting with large piscivorous predators (high predation localities) spend most of their time in shoals and those coexisting with an ambush predator, Rivulus hartii (recently, Anablepsoides hartii), that preys primarily on smaller guppies (low predation localities) do not. It has been suggested that this predator selects for reduced shoaling because doing so reduces salience to the predator. Here, as far as we know, we perform the first test of this idea. First, we investigated the effectiveness of shoaling in encounters with this predator. In survival trials, where one rivulus interacted with a group of guppies, we found that the predator was more likely to attack individuals in shoals than singletons. However, we also found that attacks directed at shoals were less likely to succeed. This suggests that the optimal strategy for guppies co-existing with this predator is to reduce shoaling to reduce the probability of being attacked, and to form shoals when an attack is initiated. We then asked if guppies modified their shoaling behavior in response to visual and olfactory cues from this predator during development. We found changes in guppy behavior in response to the treatment: guppies increased shoaling behavior when there was heightened risk of predation.