A unified energy principle approach is presented for analysing the magnetohydrodynamic (MHD) stability of plasmas consisting of multiple ideal and relaxed regions. The gauge a = ξ × B for the vector potential, a, of linearized perturbations is used, with the equilibrium magnetic field B obeying a Beltrami equation, × B = αB, in relaxed regions. In a region with such a force-free equilibrium Beltrami field we show that ξ obeys the same Euler-Lagrange equation whether ideal or relaxed MHD is used for perturbations, except in the neighbourhood of the magnetic surfaces where B · is singular. The difference at singular surfaces is analysed in cylindrical geometry: in ideal MHD only Newcomb's small solutions are allowed, whereas in relaxed MHD only the odd-parity large solution and even-parity small solution are allowed. A procedure for constructing global multi-region solutions in cylindrical geometry is presented. Focusing on the limit where the two interfaces approach each other arbitrarily closely, it is shown that the singular-limit problem encountered previously by Hole et al. in multi-region relaxed MHD is stabilized if the relaxed-MHD region between the coalescing interfaces is replaced by an ideal-MHD region. We then present a stable (k, pressure) phase-space plot, which allows us to determine the form a stable pressure and field profile must take in the region between the interfaces. From this knowledge, we conclude that there exists a class of single-interface plasmas that were found to be stable by Kaiser and Uecker, but are shown to be unstable when the interface is resolved.