In each famine at least two million people died. They all occurred in densely populated provinces where the subsistence foundations of agriculture was failing under the weight of demographic and market pressures. In each cases famine played a role in undermining the legitimacy of the state and the preexisting social structure.[135]