A new sufficient criterion for the stability of magnetohydrostatic equilibria and Mercier's criterion are compared for axially symmetric equilibria. For simplicity, the analysis is restricted to the neighbourhood of the magnetic axis. The stability conditions lead to the existence of critical values of the rotational transform in the neighbourhood of the magnetic axis which depend on three parameters: the ellipticity and triangularity of the plasma cross-section and the poloidal current. The dependences are qualitatively similar for both criteria. In particular, the case of stationary resistive equilibria without material sources is investigated. Also, rough estimates for the critical values of the plasma β are given. D-shaped plasma cross-sections with a diamagnetic poloidal current appear to be favourable.