One of the most striking features of the H-mode, in contrast to the L-mode, is the existence of very steep pressure gradients in a narrow layer just inside the plasma boundary. In this paper, it is shown how the existence of H- and L-regimes, together with their characteristic profiles, is a natural consequence of the modiĀ­fied ballooning stability properties near a magnetic separatrix.