We present a systematic nonlinear theory of pattern selection for parametric surface waves (Faraday waves), not restricted to fluids of low viscosity. A standing wave amplitude equation is derived from the Navier-Stokes equation that is of gradient form. The associated Lyapunov function is calculated for different regular patterns to determine the selected pattern near threshold as a function of a damping parameter γ. For γ∼1, we show that a single wave (or stripe) pattern is selected. For γ≪1, we predict patterns of square symmetry in the capillary regime, a sequence of sixfold (hexagonal), eightfold, ₽ in the mixed gravity-capillary regime, and stripe patterns in the gravity dominated regime.