Solid-phase microextraction (SPME) is a fast, alternative method for extracting organochlorine, triazine and thiocarbamate pesticides. An 85-μm polyacrylate fiber was used to extract the analytes directly from aqueous samples and then thermal desorption was carried out in the hot injector of a gas chromatograph–mass spectrometer. To enhance the sensitivity of SPME, the temperature and the length of the extraction and desorption steps and the pH and salt concentration of the sample were optimized. The linearity of most of pesticides for real samples was found to be between 0.07 and 30 μg l −1 when GC–MS under full-scan acquisition was used and between 0.005 and 10 μg l −1 when selected-ion monitoring (SIM) acquisition was used. Limits of detection at the sub μg l −1 level were achieved with GC and MS under the full-scan acquisition mode and at the ng l −1 level for MS under SIM acquisition. The repeatability of the method for tap water spiked at a level of 0.5 μg l −1 (n=5) was below 25% (R.S.D.).