A Lagrangian for strongly nonlinear unsteady water waves (including overturning waves) is obtained. It is shown that the system of quadratic equations for the Stokes coefficients, which determine the shape of a steady wave (discovered by Longuet-Higgins 100 years after Stokes derived his system of cubic equations) directly follows from the canonical system of Lagrange equations. Applications to the investigation of the stability of water waves and to the construction of numerical schemes are pointed out. (C) 1996 American Institute of Physics.