A ground fault relay, especially useful to detect motor leakage currents due to insulation failure. The invention operates in two (2) modes. The first mode is a "look-ahead" mode where possible motor circuit insulation failure is detected prior to the electrical motor being turned on, and the second mode is "real time" mode which detects leakage currents after the motor is turned on and during running of the motor. Processing circuitry is disclosed which enables a user to set predetermined values of leakage current to be detected and to trip the relay after comparison of the leakage current and the predetermined value, if the former is larger than the latter. This invention is able to accurately detect extremely small values of ground leakage current without experiencing nuisance tripping due to extraneous noise.