A theoretical approach to studying the plasma stability in toroidal systems with a resistive wall is developed. The energy principle of the ideal magnetohydrodynamics (MHD) is based on the energy conservation. The dissipation in the wall breaks this fundamental property, but can be incorporated into the mathematical frame of the standard stability theory. Such extension is presented here. With a resistive wall the system becomes open that couples the task with calculation of additional sinks in and behind the wall. The derivations are performed without restrictions on the mode nature, aspect ratio and plasma/wall shape. General estimates are given with emphasis on applications of the derived torque–energy balance to MHD events faster than the conventional resistive wall modes (RWMs). In this dynamic range, the skin effect in the wall must be strong. This fact is used here for evaluation of the dissipative term. Finally the latter is expressed through the ideal-wall asymptote for the magnetic perturbation. Then the result gives a dispersion relation for the RWMs far from the no-wall stability boundary with a smooth transition to the ideal MHD instabilities.