A rapid, sensitive, and solvent-free procedure for the simultaneous determination of amphetamine, methamphetamine, 3,4-methylenedioxyamphetamine (MDA), and 3,4-methylenedioxymethamphetamine (MDMA) in urine was developed using solid-phase microextraction (SPME) and gas chromatography-mass spectrometry (GC-MS) in the selected ion monitoring mode. A headspace vial containing the urine sample, NaOH, NaCl, and amphetamine-d3 as the internal standard was heated at 100 degrees C for 20 min. A polydimethylsiloxane fiber was maintained in the vial headspace for 10 min in order to adsorb the amphetaminic compounds, which were subsequently derivatized by exposing the fiber to trifluoroacetic anhydride for 20 min in the headspace of another vial maintained at 60 degrees C for 20 min. The trifluoroacetyl derivatives were desorbed in the GC injection port for 5 min. Several parameters were considered during the method optimization process. These included a comparison of SPME with or without headspace, the required derivatization procedure, and the influence of temperature on the headspace extraction and derivatization methods. The optimized method was validated for the four compounds tested. Calibration curves showed linearity in the range 50-1000 ng/mL (r = 0.9946-0.9999). Recovery data were 71.89-103.24%. The quantitation limits were 10 ng/mL for amphetamine and methamphetamine and 20 ng/mL for MDA and MDMA. All of these data recommend the applicability of the method for use in the analytical routine of a forensic laboratory.