Among the 10 ant species visiting the extrafloral nectaries of sponge gourd plants [Luffa cylindrica L. (Cucurbitaceae)], Camponotus compressus (Fabricius) (Hymenoptera: Formicidae) appears to be the ecologically dominant species, due to its abundance and the high frequency of deterrent encounters with the major insect herbivore, Raphidopalpa foveicollis Lucas (Coleoptera: Chrysomelidae). A significant positive linear correlation was found between the number of extrafloral nectaries per leaf, calyx, bract, and bracteole and the patrolling time of C. compressus, Camponotus paria (Emery), Pheidole spec., and Tetramorium spec. (all Hymenoptera: Formicidae) at the corresponding plant parts. Many one-to-one deterrent interactions between the ant visitors and adult R. foveicollis were recorded, with C. compressus being involved in most encounters on the calyx and bracts, Pheidole spec. on the leaves, and Pachycondyla tesserinoda (Emery) (Hymenoptera: Formicidae) on the bracteoles. Tapinoma melanocephalum (Fabr.) (Hymenoptera: Formicidae) exhibited significant deterrent effects on adult herbivores on the corolla when in groups larger than 15 ants. Ant exclusion and inclusion experiments revealed a significant reduction in the residence time, as well as dose- and time-dependent reduction in the frequency of visits of the herbivore on crop plants with C. compressus, C. paria, Pheidole spec., and T. melanocephalum ants, compared to the control. Results support the optimal defence hypothesis, as the plant structures most closely linked to plant fitness bear the extrafloral nectaries and are defended by the visiting ant species. This is a valuable, indirect plant-protection strategy of an annual crop plant.