Populations of Eruca sativa (Brassicaceae) from desert and Mediterranean (Med) habitats in Israel differ in their defense against larvae of the generalist Spodoptera littoralis but not the specialist Pieris brassicae. Larvae of the generalist insect feeding on plants of the Med population gained significantly less weight than those feeding on the desert plants, and exogenous application of methyl jasmonate (MJ) on leaves of the Med plants significantly reduced the level of damage created by the generalist larvae. However, MJ treatment significantly induced resistance in plants of the desert population, whereas the generalist larvae caused similar damage to MJ‐induced and noninduced plants. Analyses of glucosinolates and expression of genes in their synthesis pathway indicated that defense in plants of the Med population against the generalist insect is governed by the accumulation of glucosinolates. In plants of the desert population, trypsin proteinase inhibitor activity was highly induced in response to herbivory by S. littoralis. Analysis of genes in the defense‐regulating signaling pathways suggested that in response to herbivory, differences between populations in the induced levels of jasmonic acid, ethylene, and salicylic acid mediate the differential defenses against the insect. In addition, expression analysis of myrosinase‐associated protein NSP2 suggested that in plants of the desert population, glucosinolates breakdown products were primarily directed to nitrile production. We suggest that proteinase inhibitors provide an effective defense in the desert plants, in which glucosinolate production is directed to the less toxic nitriles. The ecological role of nitrile production in preventing infestation by specialists is discussed.