In this paper, we show that numerical solutions of the single-layer quasigeostrophic equation in a beta-plane basin approach the state predicted by equilibrium statistical mechanics when the forcing and dissipation are (unrealistically) zero. This equilibrium state, which we call Fofonoff flow, consists of a quasi-steady uniform westward interior flow closed by inertial boundary layers. When wind stress and bottom drag are switched on, we find that the nonlinear terms in the quasigeostrophic equation still try to drive the flow toward Fofonoff flow, but their success at this depends strongly on the geometry of the wind stress. If the prescribed wind stress exerts a torque with the right sign to balance the bottom-drag torque around every closed streamline of the Fofonoff flow, then solutions to the wind-driven quasigeostrophic equation are energetic, Fofonoff-like, and nearly steady. If, on the other hand, the wind opposes Fofonoff flow, the wind-driven solutions are turbulent, with small mean flows, and much less energy. Our results suggest that integral conservation laws (on which the equilibrium statistical mechanics is solely based) largely define the role of the nonlinearities in the quasigeostrophic equation. To support this viewpoint, we demonstrate a resemblance between the solutions of the quasigeostrophic equation and the solutions of a stochastic model equation. The stochastic model equation, in which the advected vorticity is replaced by a random variable, has only gross conservation laws in common with the quasigeostrophic equation.