The overall aim of this work was to examine the degradation of trimethoprim (TMP), which is an antibacterial agent, during the application of two advanced oxidation process (AOP) systems in secondary treated domestic effluents. The homogeneous solar Fenton process (hv/Fe(2+)/H2O2) and heterogeneous photocatalysis with titanium dioxide (TiO2) suspensions were tested. It was found that the degradation of TMP depends on several parameters such as the amount of iron salt and H2O2, concentration of TiO2, pH of solution, solar irradiation, temperature and initial substrate concentration. The optimum dosages of Fe(2+) and H2O2 for homogeneous ([Fe(2+)] = 5 mg L(-1), [H2O2] = 3.062 mmol L(-1)) and TiO2 ([TiO2] = 3 g L(-1)) for heterogeneous photocatalysis were established. The study indicated that the degradation of TMP during the solar Fenton process is described by a pseudo-first-order reaction and the substrate degradation during the heterogeneous photocatalysis by the Langmuir-Hinshelwood kinetics. The toxicity of the treated samples was evaluated using a Daphnia magna bioassay and was finally decreased by both processes. The results indicated that solar Fenton is more effective than the solar TiO2 process, yielding complete degradation of the examined substrate within 30 min of illumination and dissolved organic carbon (DOC) reduction of about 44% whereas the respective values for the TiO2 process were ∼70% degradation of TMP within 120 min of treatment and 13% DOC removal.