In seismology, the mainshock is the largest earthquake in a sequence, sometimes preceded by one or more foreshocks, and almost always followed by many aftershocks.