Faraday waves arise on the surface of a liquid in a container that is undergoing vertical periodic oscillations. We investigate two-dimensional Faraday waves in a long rectangular container, both theoretically and experimentally. Hysteresis occurs when both finite amplitude solutions and the flat surface solution are available. We derive a nonlinear model of a standing wave, extending the Lagrangian method of Miles (1976). The model is used to investigate hysteresis. It is found necessary to retain cubic damping, cubic forcing and the fifth-order conservative term in order to achieve agreement with experiments. The fifth-order conservative term was omitted from all previous studies of Faraday waves. Stable limit cycles are found to arise from this single-mode equation. We examine the structure of this new solution in detail, both analytically and numerically. We describe local bifurcations using a multiple time scales analysis and global bifurcations using Melnikov's method. The coefficients of linear and cubic damping are derived for a standing wave in a rectangular container by considering energy dissipation in the main body of the fluid (due to potential flow and streaming) and in boundary layers at the sidewalls and at the surface. Surface contamination, due to the presence of a thin viscoelastic surface film, creates a boundary layer at the surface which causes enhanced dissipation comparable to, or greater than, that caused by the boundary layers at the walls of the container. Three-mode interaction equations are used to model intermittency and complex modulations which are found to arise from a sideband instability mechanism similar to that of Eckhaus (1963) and Benjamin & Feir (1967). The role of cubic and fifth-order nonlinear terms on this instability mechanism is examined. Theoretical results are found to compare quite favourably with experimental data.