Parasitoid wasps are a fierce predator of Drosophila larvae. Female Leptopilina boulardi (LB) wasps use a sharp ovipositor to inject eggs into the bodies of Drosophila melanogaster larvae. The wasp then eats the Drosophila larva alive from the inside, and an adult wasp ecloses from the Drosophila pupal case instead of a fly. However, the Drosophila larvae are not defenseless as they may resist the attack of the wasps through somatosensory-triggered behavioral responses. Here we describe the full range of behaviors performed by the larval prey in immediate response to attacks by the wasps. Our results suggest that Drosophila larvae primarily sense the wasps using their mechanosensory systems. The range of behavioral responses included both "gentle touch" like responses as well as nociceptive responses. We found that the precise larval response depended on both the somatotopic location of the attack, and whether or not the larval cuticle was successfully penetrated during the course of the attack. Interestingly, nociceptive responses are more likely to be triggered by attacks in which the cuticle had been successfully penetrated by the wasp. Finally, we found that the class IV neurons, which are necessary for mechanical nociception, were also necessary for a nociceptive response to wasp attacks. Thus, the class IV neurons allow for a nociceptive behavioral response to a naturally occurring predator of Drosophila.