Active and passive techniques are two different techniques with which to detect buried explosives. In practice, the most preferred active method works by broadcasting a signal underground. This signal may stimulate the buried explosive and cause it to explode. It is important to eliminate or minimize this drawback to ensure the safety of the detector operator. In this respect, it is important to increase the studies on the passive detection technique which is not currently used in practice. The aim of this study was to passively detect improvised explosive devices without stimulating them, and to classify underground objects as explosive or non-explosive. A fluxgate sensor array having 33 components was used for passive magnetic field measurements, and the nearest neighborhood algorithm was preferred for classifying the resulting data. In experimental studies, 33 different samples having different amounts of ferromagnetic properties were used. Successful imaging and classification were achieved for the measurements up to 20 cm below the surface of soil. Data were recorded as 32 × 25 matrices, and then they were reduced to 32 × 2 matrices having the same features. Samples having explosive properties were distinguished from other underground objects with success rates of 86% and 95% for 32 × 25 and 32 × 2 data matrices, respectively. Classification times for 32 × 25 and 32 × 2 data matrices were 42 ms and 3.62 ms, respectively. For data groups where the best results were obtained for the data matrices, frame numbers classified in one second were calculated as 23.80 and 276.2, respectively. False alarm rate achieved was 5.31%. The experimental results proved the successes of the matrices reduction and classification approach. One of the most common problems encountered in passive detecting techniques is that the sensor position affects the measurements negatively. In this paper, a solution has been proposed for this important problem.