A method for controlling microbial or biofilm growth in a medium includes mixing ammonium carbamate or ammonium sulfamate with an aqueous solution of a hypochlorite oxidant to form a biocide having a pH between 9.0 and 11.5, the molar ratio of the ammonium carbamate or ammonium sulfamate to the hypochlorite being at least 1:1 and then applying the biocide to the medium.