Foreshock

A foreshock is an earthquake that occurs before a larger seismic event (the mainshock) and is related to it in both time and space. The designation of an earthquake as "foreshock", "mainshock" or aftershock is only possible after the full sequence of events has happened.
Occurrence.
Foreshock activity has been detected for about 40% of all moderate to large earthquakes, and about 70% for events of M>7.0. They occur from a matter of minutes to days or even longer before the main shock; for example, the 2002 Sumatra earthquake is regarded as a foreshock of the 2004 Indian Ocean earthquake with a delay of more than two years between the two events.
Some great earthquakes (M>8.0) show no foreshock activity at all, such as the M8.6 1950 India–China earthquake.
The increase in foreshock activity is difficult to quantify for individual earthquakes but becomes apparent when combining the results of many different events. From such combined observations, the increase before the mainshock is observed to be of inverse power law type. This may either indicate that foreshocks cause stress changes resulting in the mainshock or that the increase is related to a general increase in stress in the region.
Mechanics.
The observation of foreshocks associated with many earthquakes suggests that they are part of a preparation process prior to nucleation. In one model of earthquake rupture, the process forms as a cascade, starting with a very small event that triggers a larger one, continuing until the main shock rupture is triggered. However, analysis of some foreshocks has shown that they tend to relieve stress around the fault. In this view, foreshocks and aftershocks are part of the same process. This is supported by an observed relationship between the rate of foreshocks and the rate of aftershocks for an event.
Earthquake prediction.
An increase in seismic activity in an area has been used as a method of predicting earthquakes, most notably in the case of the 1975 Haicheng earthquake in China, where an evacuation was triggered by an increase in activity. However, most earthquakes lack obvious foreshock patterns and this method has not proven useful, as most small earthquakes are not foreshocks, leading to probable false alarms. Earthquakes along oceanic transform faults do show repeatable foreshock behaviour, allowing the prediction of both the location and timing of such earthquakes.