We consider a time optimal control problem arisen from the optimalmanagement of a bioreactor devoted to the treatment ofeutrophicated water. We formulate this realistic problem as astate-control constrained time optimal control problem. Afteranalyzing the state system (a complex system of coupled partialdifferential equations with non-smooth coefficients foradvection-diffusion-reaction with Michaelis-Menten kinetics,modelling the eutrophication processes) we demonstrate theexistence of, at least, an optimal solution. Then we present adetailed derivation of a first order optimality condition(involving the corresponding adjoint systems) characterizing theseoptimal solutions. Finally, a numerical example is shown.