This paper proposes an intelligent relaying scheme for transmission lines compensated by Unified Power Flow Controller (UPFC). The algorithm uses a new relaying signal termed as imaginary part of integrated impedance (IPII). The synchronized phasor measurement units at both ends of the transmission line are used to extract voltage and current phasors from instantaneous volatage and current signals. The volatage and current phasors are utilised to derive IPII of each phase. Further, IPII of each phase are used as input to a data-mining model termed as decision tree (DT) which provides the final relaying decision. The proposed algorithm is validated on real time digital simulator (RTDS) platform and the results obtained indicate that the proposed scheme is reliable in protecting transmission system compensated by UPFC. © 2014 ACPE.