A weakly nonlinear Hamiltonian model is derived from the exact water wave equations to study the time evolution of spatially periodic wavetrains. The model assumes that the spatial spectrum of the wavetrain is formed by only three free waves, i.e. a carrier and two side bands. The model has the same symmetries and invariances as the exact equations. As a result, it is found that not only the permanent form travelling waves and their stability are important in describing the time evolution of the waves, but also a new kind of family of solutions which has two basic frequencies plays a crucial role in the dynamics of the waves. It is also shown that three is the minimum number of free waves which is necessary to have chaotic behaviour of water waves