Solid-phase microextraction coupled to GC-MS was optimised for the determination of polycyclic aromatic hydrocarbons (PAHs), phthalate esters and polychlorinated biphenyls (PCBs) in water samples. A 30-microm polydimethylsiloxane fiber was immersed in a 30-ml water sample that contained the analytes of interest (PAHs, PCBs and phthalate esters) and the variables studied were extraction time (15-60 min), extraction temperature (30-90 degrees C), desorption time (1-5 min), desorption temperature (220-270 degrees C) and the addition of sodium chloride (0-9 g). The MultiSimplex programme based on the simplex algorithm was used to establish the optimal conditions. MultiSimplex allowed the simultaneous study of the variables mentioned above and considered the answers of all types of compounds studied in this work. Thus, the optimal conditions obtained allowed the simultaneous determination of PAHs, phthalate esters and PCBs. Furthermore, the accuracy and repeatability of the developed method were calculated from water samples spiked at known concentrations of the analytes. Finally, the optimised method was used to analyse water samples from different sampling points of the Urdaibai and Nerbioi-Ibaizabal estuaries (Biscay, Spain).