The coupling of a headspace sampler to a fast gas chromatography system with mass spectrometry detection is proposed as a method for the identification of the sources of contamination in soils due to the presence of hydrocarbons derived from petroleum. The samples are subjected to the headspace generation process, with no prior treatment, and the volatiles generated are separated by fast gas chromatography. The total time of the chromatogram per sample is less than six minutes. Chemometric treatments, such as hierarchical cluster analysis (HCA), principal component analysis (PCA), and soft independent modelling of class analogy (SIMCA) were applied to the signals obtained for the different samples. The variables used for the chemometric treatments include m/z ratios characteristic of linear and branched saturated hydrocarbons, alkyl cyclohexanes, benzene, toluene, xylenes, C3-benzenes, naphthalene and methyl-naphthalenes. The results obtained show clear differentiated clusters for the different crude oils and correct predictions when SIMCA is applied, thus allowing the differentiation of types of crude oils contaminating soils in a rapid and reliable manner. (c) 2006 Elsevier B.V. All rights reserved.