This study is focused on the disinfection of raw dairy wastewater by means of a sequential treatment including an electrocoagulation (EC) step with an Fe|Fe cell followed by electro-Fenton (EF) or UVA-assisted photoelectro-Fenton (PEF). The two latter methods were run with an air-diffusion cathode for H2O2 generation and either a boron-doped diamond (BDD) or a RuO2-based anode. The inactivation of heterotrophic and lactic acid bacteria, Escherichia coli and enterococci was assessed. Low removal of organic load was found in all cases, whereas the bacteria were poorly removed by the flocs formed in EC but largely inactivated in EF and PEF. EF was also advantageous because it prevented the formation of harmful sludge containing active bacteria, in contrast to EC. Heterotrophs were the most stable bacteria, whereas the others were totally inactivated in most cases. In the sequential EC/EF process involving a BDD anode in the latter step, the inactivation rate for the lactic acid bacteria was higher at circumneutral pH, due to the great ability of produced active chlorine to oxidize the molecules of the cell walls. The use of a RuO2-based anode also led to a quick inactivation at pH 3.0. A better performance was achieved when PEF replaced EF, regardless of the anode, owing to the enhanced bacterial inactivation by UVA radiation. The raw dairy wastewater at natural pH 5.7 treated by single EF step with a RuO2-anode also yielded a faster removal of lactic acid bacteria, Escherichia coli and enterococci as compared to BDD, always remaining small contents of active heterotrophs in solution.