The problem of the existence of a minimum energy state is studied in the set H of all the magnetic fields B: (i) occupying the half-cylinder D={r < R,z > 0}; (ii) having a normal component vanishing on the vertical part {r=R} of the boundary of D and taking given values Q(r) on its horizontal part {z=0}; (iii) having a relative helicity equal to a prescribed value H. It is first shown that the only field that may possibly be an energy minimizer in H is the unique (and therefore axisymmetric) constant-alpha force-free field B(alpha) contained in that set. Thus it is proved that Ba minimizes the energy indeed if and only if 0 less-than-or-equal-to Absolute value of H less-than-or-equal-to H(c) < infinity, where H(c) is an estimated critical value. For H(c) < Absolute value of H < infinity, on the contrary, it is possible to construct in H nonaxisymmetric fields with an energy smaller than that of B(alpha) and no minimum energy state does exist. However, B(alpha) still minimizes the energy for H(c) < Absolute value of H less than or equal to H(c)ax (with possibly H(c)ax = infinity) if attention is restricted to the axisymmetric fields of H. These results are used to put a limit on the validity of a popular model of the heating of the solar corona, in which the field of a coronal structure is supposed to release sporadically, by Taylor's relaxation, a part of the energy it continuously extracts from the kinetic energy of the photospheric motions. It is argued that, as a consequence of the results above, one of the basic assumptions of the model breaks down when the field becomes highly sheared. It is speculated that, in such a situation, a completely new regime should set up, in which helicity and energy are continuously ejected at large distances by the system.