The essential oil from the aerial parts of Lobularia maritima was investigated for its chemical composition, and its repellent and insecticidal efficacy against the grain pests Callosobruchus maculatus, Tribolium castaneum and Sitophilus oryzae. A number of 41 compounds were identified by GC-MS from which azeleonitrile (39.7%), trans-3-pentenenitrile (36.3%) and 4-isothiocyanato-1-butene (10.9%) were the most abundant. A fumigant bioassay-guided fractionation of the essential oil constituents led to the isolation of trans-3-pentenenitrile. Its structure was confirmed by EI-MS and NMR techniques. Fumigant effect of the essential oil was strong (LC 50 = 7.48 μL/L) on C. maculatum and moderate on S. oryzae and T. castaneum (LC 50 = 35.37 and 59.94 μL/L, respectively). trans-3-pentenenitrile showed strong fumigant effect on the three pest species (LC 50 = 6.62-8.36 μL/L). Both the oil and trans-3-pentenenitrile showed strong contact effect with LD 50 values in the range 4.84-7.81 µg/adult. The oil showed a repellency of 100% on C. maculatus and S. oryzae at concentrations higher than 0.05 and 0.1 nL/cm 2 , respectively, and 93% against T. castaneum yet at 0.2 nL/cm 2 . trans-3-pentenenitrile also showed 100% repellency against C. maculatus (≥ 0.05 nL/cm 2 ), S. oryzae (≥ 0.15 nL/cm 2 ) and T. castaneum (0.2 nL/cm 2 ). The results in this study indicated that the essential oil of L. maritima is an important source of trans-3-pentenenitrile which can be used in the development of insecticidal agents against the three grain pests.