Fifteen metallic species, silver (Ag), aluminum (Al), calcium (Ca), cadmium (Cd), chromium (Cr), copper (Cu), iron (Fe), potassium (K), magnesium (Mg), manganese (Mn), sodium (Na), nickel (Ni), lead (Pb), strontium (Sr) and zinc (Zn), were determined in 46 cocaine samples confiscated by the Spanish police in Galicia (northwest Spain). Classification of these cocaine samples according to their geographic origin (Colombia and Venezuela) was achieved by the application of pattern recognition techniques to the metallic content data. Cocaine samples, around 0.5 g, were directly dissolved in 2 mL of 35.0% (v/v) HNO3, diluted to 10 mL with ultrapure water. The metals were quantified by means of electrothermal atomic absorption spectrometry (Ag, Al, Cd, Cr, Cu, Mn, Ni, Pb and Sr), flame atomic absorption spectrometry (Ca, Fe, Mg and Zn), and flame atomic emission spectrometry (K and Na). Results show that two geographic origins can be established through the presence of trace and major elements.