In this work we have studied the treatment of imazapyr by electrochemical oxidation with boron-doped diamond anode. Electrochemical degradation experiments were performed in a one-compartment cell containing 0.45 L of commercial formulations of herbicide in the pH range 3.0-10.0 by applying a density current between 10 and 150 mA cm(-2) and in the temperature range 25-45 °C. The maximum current efficiencies were obtained at lower current densities since the electrochemical system is under mass transfer control. The mineralization rate increased in acid medium and at higher temperatures. The treatment was able to completely degrade imazapyr in the range 4.6-100.0 mg L(-1), although the current charge required rises along with the increasing initial concentration of the herbicide. Toxicity analysis with the bioluminescent bacterium Vibrio fischeri showed that at higher pollutant concentrations the toxicity was reduced after the electrochemical treatment. To clarify the reaction pathway for imazapyr mineralization by OH radicals, LC-MS/MS analyses we performed together with a theoretical study. Ions analysis showed the formation of high levels of ammonium in the cathode. The main final products of the electrochemical oxidation of imazapyr with diamond thin film electrodes are formic, acetic and butyric acids.