Drosophila class IV neurons are polymodal nociceptors that detect noxious mechanical, thermal, optical, and chemical stimuli. Escape behaviors in response to attacks by parasitoid wasps are dependent on class IV cells, whose highly branched dendritic arbors form a fine meshwork that is thought to enable detection of the wasp’s needle-like ovipositor barb. To understand how mechanical stimuli trigger cellular responses, we used a focused 405-nm laser to create highly localized lesions to probe the precise position needed to evoke responses. By imaging calcium signals in dendrites, axons, and soma in response to stimuli of varying positions, intensities, and spatial profiles, we discovered that there are two distinct nociceptive pathways. Direct stimulation to dendrites (the contact pathway) produces calcium responses in axons, dendrites, and the cell body, whereas stimulation adjacent to the dendrite (the noncontact pathway) produces calcium responses in the axons only. We interpret the noncontact pathway as damage to adjacent cells releasing diffusible molecules that act on the dendrites. Axonal responses have higher sensitivities and shorter latencies. In contrast, dendritic responses have lower sensitivities and longer latencies. Stimulation of finer, distal dendrites leads to smaller responses than stimulation of coarser, proximal dendrites, as expected if the contact response depends on the geometric overlap of the laser profile and the dendrite diameter. Because the axon signals to the central nervous system to trigger escape behaviors, we propose that the density of the dendritic meshwork is high not only to enable direct contact with the ovipositor but also to enable neuronal activation via diffusing signals from damaged surrounding cells. Dendritic contact evokes responses throughout the dendritic arbor, even to regions distant and distal from the stimulus. These dendrite-wide calcium signals may facilitate hyperalgesia or cellular morphological changes after dendritic damage.