Nonlinear magnetohydrodynamic stability