A fault-tolerant control algorithm based on sliding modes is proposed to ensure the tracking of the desired trajectory for time-varying systems even in the presence of actuator faults. The proposed algorithm uses a continuous integral sliding mode and a linear quadratic regulator, together with control allocation and system inversion techniques, resulting in both a finite-time exact compensation of the faults and the exponential tracking of the reference.