The present work describes the development of a sensitive and reliable analytical method based on solid-phase extraction followed by analysis using liquid chromatography with tandem mass spectrometry for the simultaneous determination of pharmaceuticals from antibiotics (fluoroquinolones, sulfonamides, and their N(4)-acetyl metabolites, and trimethoprim as sulfonamides synergist) and anthelmintics groups. SPE was optimized using different cartridges (Strata-X, Oasis HLB, Strata C18 -E, Isolute C18 , SampliQ C8 /Si-SCX). The highest recovery was achieved using Strata X cartridge (>80%) with good reproducibility (RSDs < 5%) despite various physicochemical properties of the compounds. Investigated analytes were identified and quantitatively determined by liquid chromatography with tandem mass spectrometry using multiple reaction monitoring. The method was shown to be linear over the concentration range of 0.05-30 μg/L for febantel and albendazole, and 0.10-60 μg/L for all other pharmaceuticals. Correlation coefficients were >0.99 for all compounds except for sulfamethazine (0.98). In order to demonstrate the applicability of the developed method, wastewater from the veterinary industry was analyzed. Results evidenced the presence of febantel, praziquantel, albendazole, enrofloxacin, sulfamethazine, and sulfadiazine.