In this paper different multivariate classification methods applied to hyperspectral images acquired in the short-wave infrared range (SWIR: 1000–2500 nm) were evaluated for quality control of pistachio nuts. In more detail, the detection of contaminants in edible pistachio products was assessed. Six material classes (i.e. edible and inedible pistachio nuts, pistachio shells, pistachio husks, twigs, and stones) were investigated. Samples were divided into two groups: a training set and a validation set. The acquired hyperspectral images were first explored by Principal Component Analysis (PCA). The following multivariate classification methods were selected in order to verify and compare their efficiency and robustness: Partial Least Squares-Discriminant Analysis (PLS-DA), Principal Component Analysis with Discriminant Analysis (PCA-DA), Principal Component Analysis with k-Nearest Neighbor (PCA-kNN), and Classification And Regression Tree (CART). The classification results obtained for the four models in terms of prediction maps and values of the performance parameters ( Sensitivity , Specificity, and Efficiency ) were good in most cases. The main misclassification errors occur between ‘Edible pistachio’ and ‘Inedible pistachio’ classes and between ‘Pistachio shell’, ‘Pistachio husk’, and ‘Twig’ classes, confirming the similar spectral features of such classes observed by PCA. PCA-kNN provided the best discrimination ability in prediction, with Efficiency values from 0.92 to 0.99, followed by PLS-DA and PCA-DA. The performance of CART decreased from the calibration to the validation phase. The overall results demonstrated that SWIR-HSI technology, coupled with multivariate analysis modeling, is a promising approach to develop both ‘off-line’ and ‘on-line’ fast, reliable and robust contaminant detection in edible pistachios. • Pistachio quality control by short-wave infrared hyperspectral imaging. • Chemometric strategies applied to hyperspectral images for contaminant detection in pistachio nuts. • Detection of edible pistachio and different contaminants in automated and non-destructive way. • Comparison of different classification models for pistachios and contaminants identification. • Identification of a robust and efficient strategy for quality control of edible pistachio.