Sensory inputs are integrated extensively before decision making, with altered multisensory integration being associated with disorders such as autism. We demonstrate that the two C. elegans AIB interneurons function as a biphasic switch, integrating antagonistic, tonic, and acute inputs from three distinct pairs of sensory neurons to modulate nociception. Off food, animals reverse away from a noxious stimulus. In contrast, on food or serotonin, AIB signaling is inhibited and, although animals initiate an aversive response more rapidly, they continue forward after the initial backward locomotion is complete. That is, animals continue to move forward and feed even when presented with a noxious repellant, with AIB inhibition decreasing the repellant concentration evoking a maximal response. These studies demonstrate that the AIBs serve as an integrating hub, receiving inputs from different sensory neurons to modulate locomotory decision making differentially, and highlight the utility of this model to analyze the complexities of multisensory integration.