The objective of the present study was to determine the inhibitory effect of dietary rosemary diterpenes on the formation of the volatile organic compounds (VOCs) responsible for rancid flavour in raw lamb meat. The lamb diet was supplemented during the fattening stage with two levels (200 and 400 mg/kg feed) of a dietary rosemary extract (DRE) containing carnosic acid and carnosol (1 : 1, w/w). The formation of VOCs (determined by headspace solid-phase microextraction at 40°C and MS) and odour deterioration (assessed by quantitative descriptive analysis) were monitored in meat fillets (longissimus dorsi-lumborum muscle) packed in a 70/30 O2/CO2 protective atmosphere and kept at 2°C for up to 14 days. The raw meat odour deteriorated under pro-oxidizing conditions due to the development of an incipient rancidity caused by the formation of volatiles from lipid oxidation. A total of 46 volatile compounds were determined in lamb headspace: 18 aldehydes, seven alcohols, seven organic acids, six ketones, four furan compounds, two benzene compounds, one ester and one terpenoid. The use of DRE contributed to inhibit VOC formation and rancidity. Heptanal, octanal, nonanal and 2-pentyl-furan were the only VOCs affected (P<0.05) by the diet at any storage time. In general, VOC formation rate during storage was lower (P<0.05) in the meat from lambs that received a diet supplemented with 400 mg DRE/kg feed than in the meat from lambs receiving no dietary supplementation. VOC inhibition was less effective when the dose of DRE was reduced to 200 mg/DRE kg, although it depended on the VOC analysed. The intensity of rancid odour correlated (P<0.05) with the values of 43 of the 46 VOCs. The highest coefficients were obtained for octanol and octanal (R>0.75; P<0.001), although similar values were obtained for the coefficients of a large number of carbonyl, alcohols and furan compounds, among other volatiles, which can be considered molecular markers of rancidity in raw lamb meat. Principal component analysis confirmed that the differences in the VOC profile make it possible to identify whether or not samples have been reinforced with dietary rosemary diterpenes. Thus, VOC profiling can be regarded as a useful tool for assessing the dietary treatments used in sheep to improve the oxidative stability of lamb meat.