A mathematical model for the primary chemical processes occurring in 1 J/pulse electrical discharges in water has been developed. The discharge channel is divided into two zones: the core and the recombination region. The core is a very narrow (ca 10 µm) part of the channel where high temperature initiation reactions take place and where the majority of molecular hydrogen and 47% of the molecular oxygen are formed. The recombination region is a 200 µm radius zone where additional reactions such as hydrogen peroxide formation take place. The temperature in the core ranged from 5000 K at the centre to 2000 K at the boundary and the pressure, the only adjustable parameter in the system, was found to be 14 atm. The model describes for the first time how molecular oxygen is formed in an underwater discharge and it is also able to describe the experimentally observed stoichiometry of H2, O2 and H2O2 formation. The concentration and temperature profiles inside the discharge channel as well as a general scheme for the water dissociation and molecular species formation are also reported.