The spatial and temporal distributions of seismicity preceding moderate (ML ≧ 5.0) main shocks in the San Andreas fault system in California have been analyzed to recognize and characterize the patterns of foreshock occurrence. Of 20 main shocks in the San Andreas system, 7, or 35 per cent, have been preceded by immediate foreshock sequences that included events within 1 day and 5 km of the main shocks. A possible correlation of the rate of foreshock occurrence with type of faulting was found such that none of the four main shocks with reverse faulting had foreshocks while 44 per cent of the strike-slip earthquakes had foreshocks. Some enhanced seismic activity was also observed at relatively large distances from the main shock (13 to 30 km) 1 to 5 days before 40 per cent of the main shocks but this activity cannot be clearly distinguished from the background seismicity. Of the seven immediate foreshock sequences, only two had the swarm-like appearance of the class II foreshocks defined by Mogi. The other foreshock sequences appear to be single events (sometimes with their own aftershocks) preceding the respective main shocks. Four of these sequences are spatially correlated with distinct physical discontinuities in their faults between the hypocenters of the foreshock and main shock, and similar discontinuities may also be associated with the other sequences. The durations of the foreshock sequences were found to decrease as the depths of the main shocks increase from 3 to 11 km, which has been interpreted as a dependence on stress. To account for this stress dependence of the duration and the presence of discontinuities, a model for foreshocks occurrence is presented. This model proposes that foreshocks may represent a process of delayed multiple rupture and that the delay between occurrence of foreshock and main shock might represent the time needed for static fatigue to break the stronger rock at the discontinuity in the fault.