In this study, disinfection and formation of disinfection by-products (DBPs) were studied in a photoelectrocatalytic (PEC) treatment system. Disinfection performance of titanium dioxide (TiO2) in the PEC system was determined through Escherichia coli (E. coli) inactivation. Humic acid (HA) was used as a model organic compound and its removal was monitored by total organic carbon (TOC) measurements using 410 nm (color) and 254 nm (UV254) wavelengths. Trihalomethanes (THMs) were measured for the evaluation of DBPs formation during PEC treatment of chloride and HA mixture. It was found that unlike photocatalytic treatment, THMs might form in the PEC system. To investigate the effects of anions on the PEC treatment, chloride (Cl-), sulfate (SO42-), phosphoric acid (H2PO4-)/hydrogen phosphate (HPO42-) and bicarbonate (HCO3-) ions were added separately to the HA and bacterial suspensions. Presence of H2PO4-/HPO42- and HCO3- ions resulted in inhibitory effects on both HA degradation and E. coli inactivation, which were also examined in the photoanode. It was observed that the presence of HA had a strong inhibitory effect on the disinfection of E. coli. (C) 2010 Elsevier Ltd. All rights reserved.