A simple and sensitive method for simultaneous analysis of 43 pharmaceutical compounds in sewage sludge and sediment samples was developed and validated. The target compounds were extracted using pressurized liquid extraction (PLE) and then purified and pre-concentrated by solid phase extraction (SPE) using a hydrophilic-lipophilic balanced polymer. PLE extraction was performed on temperature of 100 degrees C, with methanol/water mixture (1/2, v/v) as extraction solvent. The quantitative analysis was performed by liquid chromatography tandem mass spectrometry using a hybrid triple quadrupole-linear ion trap mass spectrometer (LC-QqLIT-MS). Data acquisition was carried out in selected reaction monitoring (SRM) mode, monitoring two SRM transitions to ensure an accurate identification of target compounds in the samples. Additional identification and confirmation of target compounds were performed using the Information Dependent Acquisition (IDA) function. The method was validated through the estimation of the linearity, sensitivity, repeatability, reproducibility and matrix effects. The internal standard approach was used for quantification because it efficiently corrected matrix effects. Despite the strong matrix interferences, the recoveries were generally higher of 50% in both matrixes and the detection and quantification limits were very low. Beside the very good sensitivity provided by LC-QqLIT-MS, an important characteristic of the method is that all the target compounds can be simultaneously extracted, treated and analysed. Hence, it can be used for routine analysis of pharmaceuticals providing large amount of data. The method was applied for the analysis of pharmaceuticals in river sediment and wastewater sludge from three treatment plants with different treatment properties (i.e. capacity, secondary treatment, quality of influent waters). The analysis showed a widespread occurrence of pharmaceuticals in the sludge matrices.