Cross-field transport and ballooning stability in neutral beam heated ASDEX divertor tokamak plasmas below and at the β limit are analysed by computer simulations. It is found that the discharges below the limit are ballooning stable and exhibit H transport. No gradual reduction of confinement happens when beta approaches the limit ('hard' β limit). The degradation of energy confinement at the β limit is shown to be due to enhanced electron heat conduction. Resistive ballooning modes with high wavenumbers are found to be marginally stable or unstable in a radial zone where the electron heat diffusivity is enhanced by a factor of four. Broader zones correspond to stronger degradation of global energy confinement. The diffusion coefficient is raised much less than the electron heat diffusivity. Fast flattening of the current profile which keeps resistive ballooning modes close to marginal stability seems to occur. Such modes with high wavenumbers generate small scale, fluctuating Br fields which can cause magnetic braiding. It is shown that the confinement properties at the β limit are consistent with transport in stochastic magnetic fields.