It is shown that a magnetic field satisfying the mean-field magnetohydrodyn
amics equation with zero mean velocity and without energy input from the ou
tside possesses a Lyapunov function, which is a combination of the magnetic
energy and the helicity. As a consequence, if the mean magnetic field rema
ins uniformly bounded for all time, the field tends asymptotically in time
to an attractor formed by force-free states.