This paper describes a novel algorithm for feeder earthfault protection in compensated MV-networks. The algorithm combines optimal transient and steady-state performance into one function. The operation of the algorithm is based on multi-frequency neutral admittance measurement using the cumulative phasor summing technique. The main advantage of the proposed concept is that it provides valid measurement results regardless of the fault resistance value and the fault type, whether the fault has permanent, transient or an intermittent character. It also simplifies the applied protection scheme as coordination between separate protection functions dedicated to different fault types is no longer needed. First the paper introduces the theory of multi-frequency neutral admittance measurement. Secondly, the cumulative phasor summing technique is applied in this protection principle. Finally, the performance of the suggested protection algorithm is evaluated and compared with traditional earth-fault protection functions using data from simulations and comprehensive field tests conducted in a large 10 kV cable network with central and distributed compensation. The results show that the overall security and dependability of the protection can be significantly improved compared with the traditional earth-fault protection functions.