In this paper, a new algorithm based on processing differential current harmonics is proposed for digital differential protection of power transformers. This algorithm has been developed by considering different behaviors of second harmonic components of the differential currents under fault and inrush current conditions. In the new method, a criterion function is defined in terms of the time variation of the second harmonic rising rate during instants after the occurring disturbance. By evaluating the signs of the criterion function for the three phases, the internal faults can be accurately recognized from inrush current conditions in less than a half-cycle after the occurrence of a disturbance; this is one advantage of the method. Another advantage of the proposed method is that the fault detection algorithm does not depend on the selection of thresholds. A suitable performance of this method will be demonstrated by the simulation of different faults and switching conditions on a power transformer. For this purpose, a small part of theIranpower system involving a power transformer and the transmission lines on both sides of the transformer has been considered. To include effective factors on differential current components, the elements of this power system have been precisely modeled in PSCAD/EMTDC.