Pharmaceuticals are designed to improve human and animal health, but may also be a threat to freshwater ecosystems, particularly after receiving urban or wastewater treatment plant (WWTP) effluents. Knowledge on the dynamics of pharmaceuticals in engineered and natural ecosystems is rather fragmented, and a better comprehension of those processes is needed. In this study the dynamics of 8 pharmaceuticals (acetaminophen, sulfapyridine, sulfamethoxazole, carbamazepine, venlafaxine, ibuprofen, diclofenac, diazepam) and 11 of their transformation products were investigated in a WWTP and the associated receiving river ecosystem. During 3 days, concentrations of these compounds were quantified at the influents, effluents, and wastage of the WWTP, and at different distances downstream the effluent at the river. Attenuation (net balance between removal and release from and to the water column) was estimated in both engineered and natural systems using a comparable model-based approach by considering different uncertainty sources (e.g. chemical analysis, sampling, and flow measurements). Results showed that pharmaceuticals load reduction was higher in the WWTP, but attenuation efficiencies (as half-life times) were higher in the river. In particular, the load of only 5 out of the 19 pharmaceuticals was reduced by more than 90% at the WWTP, while the rest were only partially or non-attenuated (or released) and discharged into the receiving river. At the river, only the load of ibuprofen was reduced by more than 50% (out of the 6 parent compounds present in the river), while partial and non-attenuation (or release) was observed for some of their transformation products. Linkages in the routing of some pharmaceuticals (venlafaxine, carbamazepine, ibuprofen and diclofenac) and their corresponding transformation products were also identified at both WWTP and river. Finally, the followed procedure showed that dynamic attenuation in the coupled WWTP-river system could be successfully predicted with simple first order attenuation kinetics for most modeled compounds.