Taylor's theory of relaxed toroidal plasmas (states of lowest energy with f
ixed total magnetic helicity) is extended to include a vacuum between the p
lasma and the wall. In the extended variational problem, one prescribes, in
addition to the helicity and the magnetic fluxes whose conservation follow
s from the perfect conductivity of the wall, the fluxes whose conservation
follows from the assumption that the plasma-vacuum interface is also perfec
tly conducting (if the wall is a magnetic surface, then one has the toroida
l and the poloidal flux in the vacuum). Vanishing of the first energy varia
tion implies a pressureless free-boundary magnetohydrostatic equilibrium wi
th a Beltrami magnetic field in the plasma, and in general with a surface c
urrent in the interface. Positivity of the second variation implies that th
e equilibrium is stable according to ideal magnetohydrodynamics, that it is
a relaxed state according to Taylor's theory if the interface is replaced
by a wall, and that the surface current is nonzero (at least if there are n
o closed magnetic field lines in the interface). The plane slab, with suita
ble boundary conditions to simulate a genuine torus, is investigated in det
ail. The relaxed state has the same double symmetry as the vessel if, and o
nly if, the prescribed helicity is in an interval that depends on the presc
ribed fluxes. This interval is determined in the limit of a thin slab. (C)
2001 American Institute of Physics.