An automatic detection algorithm has been developed which is capable of time P-phase arrivals of both local and teleseismic earthquakes, but rejects noise bursts and transient events. For each signal trace, the envelope function is calculated and passed through a nonlinear amplifier. The resulting signal is then subjected to a statistical analysis to yield arrival time, first motion, and a measure of reliability to be placed on the P-arrival pick. An incorporated dynamic threshold lets the algorithm become very sensitive; thus, even weak signals are timed precisely. During an extended performance evaluation on a data set comprising 789 P phases of local events and 1857 P phases of teleseismic events picked by an analyst, the automatic picker selected 66 per cent of the local phases and 90 per cent of the teleseismic phases. The accuracy of the automatic picks was “ideal” (i.e., could not be improved by the analyst) for 60 per cent of the local events and 63 per cent of the teleseismic events.