A three-stage faulting model explains the observed quantitative relations between long-term precursory seismicity, mainshocks and aftershocks. Seismogenesis starts with the formation of a major crack, culminates in the corresponding major fracture and earthquake, and ends with healing. Crack formation is a self-organised critical phenomenon, and shear fracture is a delayed sequel to crack formation. It is postulated that the major crack generates a set of minor cracks, just as, later, the major fracture generates a set of minor fractures. Fracturing of the minor cracks raises the average seismicity level. By Mogi’s uniformity criterion, the major earthquake is delayed until the minor fractures have healed and the stress-field has regained relative uniformity. In accord with the scaling principle, the model applies at all magnitude levels. The size of any given initial crack determines the scale of the ensuing seismogenic process. A graphical technique of cumulative magnitude analysis gives a quantitative representation of the seismicity aspects of the model. Examples are given for large earthquakes in a region of continental collision and a subduction region. The principle of hierarchy is exemplified by the seismogenesis of a M 5.9 mainshock occurring entirely within the precursory stage of a M 7.0 mainshock. The model is capable of accommodating a variety of proposed shorter-term precursory phenomena.