The weakly electric fish Gnathonemus petersii searches at night for insect larvae in tropical African streams. The aim of this study was to determine the contributions of different sensory modalities to foraging. The time that fish needed to find two randomly placed chironomid larvae was measured. The influence of various senses on search time was investigated by blocking the use of one or more senses. Active electrolocation was used by most fish for prey detection in the dark. In addition, passive electrolocation played a role in some individuals. If light was available, vision could become the dominant sense in some individuals, replacing active electrolocation. The presence of chemical cues decreased prey detection time in most fish. Prey movements also shortened search times when active electrolocation and vision were not possible, indicating that the mechanosensory lateral line also plays a role in the detection of moving prey. The results show that G. petersii uses several senses simultaneously during foraging. Each individual favours a specific combination of the available sensory inputs. If one sensory modality is eliminated, fish can switch to other modalities, indicating that the food detection system is flexible and plastic.