Abstract Foodstuffs give rise to complex volatile profiles which may consist of several hundred components. Determination of the key components that elicit specific insect behaviour enables simplification of constituents for incorporation into attractive lures. Progress towards an attractive lure to improve detection of the foreign grain beetle, Ahasverus advena has been considerably aided by the application of a sequence of different techniques. Coupled gas chromatography–electroantennogram has shown that this species responds to just two components from a complex mixture derived from pods of the carob tree, Ceratonia siliqua (L.). These components were identified by gas chromatography–mass spectrometry as 2-nonanone and 2-undecanone. At the amounts found in the extract, these two components gave 41% and 62%, respectively, of the electroantennogram activity of the whole extract. Behavioural bioassays using pitfall tests showed that each component was as attractive as the whole carob extract. These behavioural results were confirmed by use of a straight-tube olfactometer which proved a useful alternative to the pitfall test for this species. This study represents an important step towards the development of simple and effective lures for storage insect pests based on naturally occurring food attractants.