Humans and climate affect ecosystems and their services, which may involve continuous and discontinuous transitions from one stable state to another. Discontinuous transitions are abrupt, irreversible and among the most catastrophic changes of ecosystems identified. For terrestrial ecosystems, it has been hypothesized that vegetation patchiness could be used as a signature of imminent transitions. Here, we analyse how vegetation patchiness changes in arid ecosystems with different grazing pressures, using both field data and a modelling approach. In the modelling approach, we extrapolated our analysis to even higher grazing pressures to investigate the vegetation patchiness when desertification is imminent. In three arid Mediterranean ecosystems in Spain, Greece and Morocco, we found that the patch-size distribution of the vegetation follows a power law. Using a stochastic cellular automaton model, we show that local positive interactions among plants can explain such power-law distributions. Furthermore, with increasing grazing pressure, the field data revealed consistent deviations from power laws. Increased grazing pressure leads to similar deviations in the model. When grazing was further increased in the model, we found that these deviations always and only occurred close to transition to desert, independent of the type of transition, and regardless of the vegetation cover. Therefore, we propose that patch-size distributions may be a warning signal for the onset of desertification.