A method for treating municipal or industrial wastewater, in particular a method for the primary treatment of the water, the method comprising a first operating mode P1 of the treatment system referred to as reagent-free mode, a second operating mode P2 transitioning from the first reagent-free mode P1 to a third mode P3, said third operating mode P3 of the treatment system being referred to as mode with reagents, the shift from the first mode P1 to the second mode P2, from the second mode P2 to the third mode P3 and from the third mode P3 to mode P1 taking place respectively after verification of a set of conditions C1, C2 and C3.