A Hamiltonian is constructed for the description of internal motions of a stratified fluid in terms of Eulerian coordinates. The Hamiltonian describes both internal waves and motions with vertical vorticity and the couplings between them. The construction is made by a motivated recipe, based on a motivated Legendre transformation. The role of the Lin constraints in the recipe is clarified. The number of canonical variables (4) exceeds the number of physical degrees of freedom (3), giving rise to a ‘‘gauge’’ invariance. The group of gauge transformations is indentified.