Abstract A fast and selective ultra performance liquid chromatography-tandem mass spectrometry (UPLC–MS/MS) method for the determination of opiates (morphine, codeine, 6-monoacetylmorphine (6-MAM), pholcodine, oxycodone, ethylmorphine), cocaine and benzoylecgonine in urine has been developed and validated. Sample preparation was performed by solid phase extraction (SPE) on a mixed mode cation exchange (MCX) cartridge. For optimized chromatographic performance with repeatable retention times, narrow and symmetrical peaks, and focusing of all analytes at the column inlet at gradient start, a basic mobile phase consisting of 5 mM ammonium bicarbonate, pH 10.2, and methanol (MeOH) was chosen. Positive electrospray ionization (ESI +) MS/MS detection was performed with a minimum of two multiple reaction monitoring (MRM) transitions for each analyte. Deuterium labelled-internal standards were used for six of the analytes. Between-assay retention time repeatabilities ( n = 10 series, 225 injections in total) had relative standard deviation (RSD) values within 0.1–0.6%. Limit of detection (LOD) and limit of quantification (LOQ) values were in the range 0.003–0.05 μM (0.001–0.02 μg/mL) and 0.01–0.16 μM (0.003–0.06 μg/mL), respectively. The RSD values of the between-assay repeatabilities of concentrations were ≤10% at five concentration levels for all analytes, except for pholcodine. Specificity was investigated by determination of the retention times of 96 drugs and internal standards in total. Co-eluting compounds were in all cases separated by the MS/MS detection. No or only minor matrix effects were observed. Total run time, including injection and equilibration time was 5.7 min. The method has been routinely used at the Norwegian Institute of Public Health (NIPH) since August 2007 for qualitative detection of opiates, cocaine and benzoylecgonine in more than 2000 urine samples with two replicates of each sample.