Purpose: This study aimed to investigate the removal mechanisms of pharmaceutical active compounds (PhACs) and musks in a wastewater treatment plant (WWTP). Biological removal and adsorption in the activated sludge tank as well as the effect of UV radiation used for disinfection purposes were considered when performing a mass balance on the WWTP throughout a 2-week sampling campaign. Methods: Solid-phase extraction (SPE) was carried out to analyse the PhACs in the influent and effluent samples. Ultrasonic solvent extraction was used before SPE for PhACs analysis in sludge samples. PhAC extracts were analysed by LC-MS. Solid-phase microextraction of liquid and sludge samples was used for the analysis of musks, which were detected by GC-MS. The fluxes of the most abundant compounds (13 PhACs and 5 musks) out of 79 compounds studied were used to perform the mass balance on the WWTP. Results: Results show that incomplete removal of diclofenac, the compound that was found in the highest abundance, was observed via biodegradation and adsorption, and that UV photolysis was the main removal mechanism for this compound. The effect of adsorption to the secondary sludge was often negligible for the PhACs, with the exceptions of diclofenac, etofenamate, hydroxyzine and indapamide. However, the musks showed a high level of adsorption to the sludge. UV radiation had an important role in reducing the concentration of some of the target compounds (e. g. diclofenac, ibuprofen, clorazepate, indapamide, enalapril and atenolol) not removed in the activated sludge tank. Conclusions: The main removal mechanism of PhACs and musks studied in the WWTP was most often biological (45%), followed by adsorption (33%) and by UV radiation (22%). In the majority of the cases, the WWTP achieved <75% removal of the most detected PhACs and musks, with the exception of diclofenac. © 2011 Springer-Verlag.